aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/errors.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2019-07-16 20:58:41 +0100
committerGitHub <noreply@github.com>2019-07-16 20:58:41 +0100
commit64fa70a9d1ab3cea4a024a358e8a7ac891a98880 (patch)
treea3e3a8dff8c52143dff48ce88ab6c27361443b90 /activerecord/lib/active_record/errors.rb
parent8a9a96c7e88ee2c7c4c6fc717ad4a3e7c9a672f8 (diff)
parent080939c98724b039704ca8115ba610134d1edcff (diff)
downloadrails-64fa70a9d1ab3cea4a024a358e8a7ac891a98880.tar.gz
rails-64fa70a9d1ab3cea4a024a358e8a7ac891a98880.tar.bz2
rails-64fa70a9d1ab3cea4a024a358e8a7ac891a98880.zip
Merge pull request #36692 from kirs/mysql2-adapter-timeout
Raise specific exception on Mysql2::Error::TimeoutError
Diffstat (limited to 'activerecord/lib/active_record/errors.rb')
-rw-r--r--activerecord/lib/active_record/errors.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb
index c8c06375a3..012ff8c46f 100644
--- a/activerecord/lib/active_record/errors.rb
+++ b/activerecord/lib/active_record/errors.rb
@@ -365,6 +365,10 @@ module ActiveRecord
class QueryCanceled < StatementInvalid
end
+ # AdapterTimeout will be raised when database clients times out while waiting from the server
+ class AdapterTimeout < StatementInvalid
+ end
+
# UnknownAttributeReference is raised when an unknown and potentially unsafe
# value is passed to a query method when allow_unsafe_raw_sql is set to
# :disabled. For example, passing a non column name value to a relation's