mirror of
https://github.com/django/django.git
synced 2025-08-09 03:19:20 +00:00
Refs #18807 -- Removed unused exception handler from Client.request().
Unused since 8bd7b598b6de1be1e3f72f3a1ee62803b1c02010.
This commit is contained in:
parent
142e1ead76
commit
ff09add274
@ -19,7 +19,6 @@ from django.core.signals import (
|
|||||||
)
|
)
|
||||||
from django.db import close_old_connections
|
from django.db import close_old_connections
|
||||||
from django.http import HttpRequest, QueryDict, SimpleCookie
|
from django.http import HttpRequest, QueryDict, SimpleCookie
|
||||||
from django.template import TemplateDoesNotExist
|
|
||||||
from django.test import signals
|
from django.test import signals
|
||||||
from django.test.utils import ContextList
|
from django.test.utils import ContextList
|
||||||
from django.urls import resolve
|
from django.urls import resolve
|
||||||
@ -482,17 +481,7 @@ class Client(RequestFactory):
|
|||||||
exception_uid = "request-exception-%s" % id(request)
|
exception_uid = "request-exception-%s" % id(request)
|
||||||
got_request_exception.connect(self.store_exc_info, dispatch_uid=exception_uid)
|
got_request_exception.connect(self.store_exc_info, dispatch_uid=exception_uid)
|
||||||
try:
|
try:
|
||||||
try:
|
response = self.handler(environ)
|
||||||
response = self.handler(environ)
|
|
||||||
except TemplateDoesNotExist as e:
|
|
||||||
# If the view raises an exception, Django will attempt to show
|
|
||||||
# the 500.html template. If that template is not available,
|
|
||||||
# we should ignore the error in favor of re-raising the
|
|
||||||
# underlying exception that caused the 500 error. Any other
|
|
||||||
# template found to be missing during view error handling
|
|
||||||
# should be reported as-is.
|
|
||||||
if e.args != ('500.html',):
|
|
||||||
raise
|
|
||||||
|
|
||||||
# Look for a signalled exception, clear the current context
|
# Look for a signalled exception, clear the current context
|
||||||
# exception data, then re-raise the signalled exception.
|
# exception data, then re-raise the signalled exception.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user