chore: rename exceptions
This commit is contained in:
parent
4109caf1bf
commit
b11c99137c
2 changed files with 4 additions and 4 deletions
|
|
@ -161,11 +161,11 @@ class Database(object):
|
|||
elif self.is_deadlocked(e):
|
||||
err_msg = _('There was a problem accessing required resources to complete the transaction.') + '<br>'
|
||||
err_msg += _('Please try again.')
|
||||
frappe.throw(msg=err_msg, title=_('Deadlock Occurred'), exc=frappe.QueryDeadlock)
|
||||
frappe.throw(msg=err_msg, title=_('Deadlock Occurred'), exc=frappe.QueryDeadlockError)
|
||||
elif self.is_timedout(e):
|
||||
err_msg = _('There was a problem accessing required resources to complete the transaction.') + '<br>'
|
||||
err_msg += _('Please try again.')
|
||||
frappe.throw(msg=err_msg, title=_('Request Timeout'), exc=frappe.QueryTimeout)
|
||||
frappe.throw(msg=err_msg, title=_('Request Timeout'), exc=frappe.QueryTimeoutError)
|
||||
|
||||
if ignore_ddl and (self.is_missing_column(e) or self.is_missing_table(e) or self.cant_drop_field_or_key(e)):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ class DataTooLongException(ValidationError): pass
|
|||
class FileAlreadyAttachedException(Exception): pass
|
||||
class DocumentAlreadyRestored(Exception): pass
|
||||
class AttachmentLimitReached(Exception): pass
|
||||
class QueryTimeout(ValidationError): pass
|
||||
class QueryDeadlock(ValidationError): pass
|
||||
class QueryTimeoutError(ValidationError): pass
|
||||
class QueryDeadlockError(ValidationError): pass
|
||||
# OAuth exceptions
|
||||
class InvalidAuthorizationHeader(CSRFTokenError): pass
|
||||
class InvalidAuthorizationPrefix(CSRFTokenError): pass
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue