summaryrefslogtreecommitdiff
path: root/django/core/exceptions.py
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2020-09-07 13:33:47 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-09-09 09:04:28 +0200
commit2808cdc8fb15ad27f83af3e62db69f5ea7ced29e (patch)
tree8a2d09cad742e8f839bdb6ce21b6dc1bc2c73e82 /django/core/exceptions.py
parentfc1446073ed9636047c48796cc20772ab60e12b0 (diff)
downloaddjango-2808cdc8fb15ad27f83af3e62db69f5ea7ced29e.tar.gz
Fixed #31962 -- Made SessionMiddleware raise SessionInterrupted when session destroyed while request is processing.
Diffstat (limited to 'django/core/exceptions.py')
-rw-r--r--django/core/exceptions.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/core/exceptions.py b/django/core/exceptions.py
index 2b3e55fe49..5780ffdb4a 100644
--- a/django/core/exceptions.py
+++ b/django/core/exceptions.py
@@ -71,6 +71,11 @@ class RequestAborted(Exception):
pass
+class BadRequest(Exception):
+ """The request is malformed and cannot be processed."""
+ pass
+
+
class PermissionDenied(Exception):
"""The user did not have permission to do that"""
pass