Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve the error message

  • Loading branch information...
commit 1d9309a5b2391b9f839dd23a213031267d03a281 1 parent db1594c
@rafaelfranca rafaelfranca authored
View
2  activerecord/lib/active_record/migration.rb
@@ -876,7 +876,7 @@ def run
record_version_state_after_migrating(migration.version)
end
rescue => e
- canceled_msg = use_transaction?(migration) ? ", the migration canceled" : ""
+ canceled_msg = use_transaction?(migration) ? ", this migration was canceled" : ""
raise StandardError, "An error has occurred#{canceled_msg}:\n\n#{e}", e.backtrace
end
end
View
2  activerecord/test/cases/migration_test.rb
@@ -277,7 +277,7 @@ def migrate(x)
e = assert_raise(StandardError) { migrator.run }
- assert_equal "An error has occurred, the migration canceled:\n\nSomething broke", e.message
+ assert_equal "An error has occurred, this migration was canceled:\n\nSomething broke", e.message
Person.reset_column_information
assert_not Person.column_methods_hash.include?(:last_name),
Please sign in to comment.
Something went wrong with that request. Please try again.