Ticket #11784: django_exception.patch

File django_exception.patch, 1.5 KB (added by anonymous, 15 years ago)

patch to subclass StandardError

  • django/core/exceptions.py

    === modified file 'django/core/exceptions.py'
     
    11"Global Django exceptions"
    22
    3 class ObjectDoesNotExist(Exception):
     3class ObjectDoesNotExist(StandardError):
    44    "The requested object does not exist"
    55    silent_variable_failure = True
    66
    7 class MultipleObjectsReturned(Exception):
     7class MultipleObjectsReturned(StandardError):
    88    "The query returned multiple objects when only one was expected."
    99    pass
    1010
    11 class SuspiciousOperation(Exception):
     11class SuspiciousOperation(StandardError):
    1212    "The user did something suspicious"
    1313    pass
    1414
    15 class PermissionDenied(Exception):
     15class PermissionDenied(StandardError):
    1616    "The user did not have permission to do that"
    1717    pass
    1818
    19 class ViewDoesNotExist(Exception):
     19class ViewDoesNotExist(StandardError):
    2020    "The requested view does not exist"
    2121    pass
    2222
    23 class MiddlewareNotUsed(Exception):
     23class MiddlewareNotUsed(StandardError):
    2424    "This middleware is not used in this server configuration"
    2525    pass
    2626
    27 class ImproperlyConfigured(Exception):
     27class ImproperlyConfigured(StandardError):
    2828    "Django is somehow improperly configured"
    2929    pass
    3030
    31 class FieldError(Exception):
     31class FieldError(StandardError):
    3232    """Some kind of problem with a model field."""
    3333    pass
    3434
    35 class ValidationError(Exception):
     35class ValidationError(StandardError):
    3636    """An error while validating data."""
    3737    pass
Back to Top