Refs #12594 -- Removed obsolete exception handling in handle_uncaught_exception().

Since 859fc020a7, this is no longer needed.
This commit is contained in:
Tim Graham 2016-06-24 09:27:47 -04:00 committed by GitHub
parent 78963495d0
commit 7e303d15c3
1 changed files with 0 additions and 4 deletions

View File

@ -11,7 +11,6 @@ from django.core.exceptions import PermissionDenied, SuspiciousOperation
from django.http import Http404 from django.http import Http404
from django.http.multipartparser import MultiPartParserError from django.http.multipartparser import MultiPartParserError
from django.urls import get_resolver, get_urlconf from django.urls import get_resolver, get_urlconf
from django.utils import six
from django.utils.decorators import available_attrs from django.utils.decorators import available_attrs
from django.utils.deprecation import RemovedInDjango20Warning from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.encoding import force_text from django.utils.encoding import force_text
@ -131,9 +130,6 @@ def handle_uncaught_exception(request, resolver, exc_info):
if settings.DEBUG: if settings.DEBUG:
return debug.technical_500_response(request, *exc_info) return debug.technical_500_response(request, *exc_info)
# If Http500 handler is not installed, reraise the last exception.
if resolver.urlconf_module is None:
six.reraise(*exc_info)
# Return an HttpResponse that displays a friendly error message. # Return an HttpResponse that displays a friendly error message.
callback, param_dict = resolver.resolve_error_handler(500) callback, param_dict = resolver.resolve_error_handler(500)
return callback(request, **param_dict) return callback(request, **param_dict)