diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2019-04-12 06:15:18 -0700 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-06-20 12:29:43 +0200 |
| commit | a415ce70bef6d91036b00dd2c8544aed7aeeaaed (patch) | |
| tree | 3583cef22e9b56d2ed52456ab586d9c47620bc51 /django/core/exceptions.py | |
| parent | cce47ff65a4dd3786c049ec14ee889e128ca7de9 (diff) | |
Fixed #30451 -- Added ASGI handler and coroutine-safety.
This adds an ASGI handler, asgi.py file for the default project layout,
a few async utilities and adds async-safety to many parts of Django.
Diffstat (limited to 'django/core/exceptions.py')
| -rw-r--r-- | django/core/exceptions.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/django/core/exceptions.py b/django/core/exceptions.py index 0e85397b9c..dc084b8692 100644 --- a/django/core/exceptions.py +++ b/django/core/exceptions.py @@ -63,6 +63,11 @@ class RequestDataTooBig(SuspiciousOperation): pass +class RequestAborted(Exception): + """The request was closed before it was completed, or timed out.""" + pass + + class PermissionDenied(Exception): """The user did not have permission to do that""" pass @@ -181,3 +186,8 @@ class ValidationError(Exception): class EmptyResultSet(Exception): """A database query predicate is impossible.""" pass + + +class SynchronousOnlyOperation(Exception): + """The user tried to call a sync-only function from an async context.""" + pass |
