diff options
author | Kir Shatrov <shatrov@me.com> | 2019-07-16 21:22:42 +0100 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2019-07-16 22:39:21 +0100 |
commit | 730d810b0dd24e80c1e88d56a5e6960363a25dbb (patch) | |
tree | 61b1eeb7dececd7301e2cba5d9eaacc102c18375 /activerecord/lib | |
parent | d473561071082489fa3f6ce11b42c9beea9b0ddc (diff) | |
download | rails-730d810b0dd24e80c1e88d56a5e6960363a25dbb.tar.gz rails-730d810b0dd24e80c1e88d56a5e6960363a25dbb.tar.bz2 rails-730d810b0dd24e80c1e88d56a5e6960363a25dbb.zip |
[ActiveRecord] Superclass for aborted queries
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/errors.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb index fa2df3a9ce..20cc987d6e 100644 --- a/activerecord/lib/active_record/errors.rb +++ b/activerecord/lib/active_record/errors.rb @@ -353,20 +353,24 @@ module ActiveRecord class IrreversibleOrderError < ActiveRecordError end + # Superclass for errors that have been aborted (either by client or server). + class QueryAborted < StatementInvalid + end + # LockWaitTimeout will be raised when lock wait timeout exceeded. class LockWaitTimeout < StatementInvalid end # StatementTimeout will be raised when statement timeout exceeded. - class StatementTimeout < StatementInvalid + class StatementTimeout < QueryAborted end # QueryCanceled will be raised when canceling statement due to user request. - class QueryCanceled < StatementInvalid + class QueryCanceled < QueryAborted end # AdapterTimeout will be raised when database clients times out while waiting from the server. - class AdapterTimeout < StatementInvalid + class AdapterTimeout < QueryAborted end # UnknownAttributeReference is raised when an unknown and potentially unsafe |