aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-04-19 11:22:32 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-04-19 11:23:59 -0300
commit1d9309a5b2391b9f839dd23a213031267d03a281 (patch)
treed292482871a1390f737cb35a23613980b5c908c0 /activerecord
parentdb1594c61c0cd1de53eeaf9e705a609ac8ba95a0 (diff)
downloadrails-1d9309a5b2391b9f839dd23a213031267d03a281.tar.gz
rails-1d9309a5b2391b9f839dd23a213031267d03a281.tar.bz2
rails-1d9309a5b2391b9f839dd23a213031267d03a281.zip
Improve the error message
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/migration.rb2
-rw-r--r--activerecord/test/cases/migration_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index d2f10cf2ac..2d2ca4c8e8 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -876,7 +876,7 @@ module ActiveRecord
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
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index b26ffa0e79..193ffb26e3 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -277,7 +277,7 @@ class MigrationTest < ActiveRecord::TestCase
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),