Improve the error message

上级 db1594c6
......@@ -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
......
......@@ -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),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册