aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2016-12-06 05:14:32 -0500
committerGitHub <noreply@github.com>2016-12-06 05:14:32 -0500
commit5a44a01c7b6b3b168978a7c1e3ecd6e83d12679b (patch)
treeb52e07b0ace6b614fa7a11ba14d370d5ba78ac82 /activerecord/lib/active_record
parente10617303475488974fbe635d427f793faeb3f05 (diff)
parentfd65d1525203eaee77e3de55e7cb5ad13b5a21f5 (diff)
downloadrails-5a44a01c7b6b3b168978a7c1e3ecd6e83d12679b.tar.gz
rails-5a44a01c7b6b3b168978a7c1e3ecd6e83d12679b.tar.bz2
rails-5a44a01c7b6b3b168978a7c1e3ecd6e83d12679b.zip
Merge pull request #27275 from kamipo/should_inherit_statement_invalid
Should inherit `StatementInvalid` rather than `WrappedDatabaseException`
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/errors.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb
index 7c8be37326..78ff2756f9 100644
--- a/activerecord/lib/active_record/errors.rb
+++ b/activerecord/lib/active_record/errors.rb
@@ -124,7 +124,7 @@ module ActiveRecord
end
# Raised when a foreign key constraint cannot be added because the column type does not match the referenced column type.
- class MismatchedForeignKey < WrappedDatabaseException
+ class MismatchedForeignKey < StatementInvalid
def initialize(adapter = nil, message: nil, table: nil, foreign_key: nil, target_table: nil, primary_key: nil)
@adapter = adapter
if table