MCPcopy
hub / github.com/django/django / handle_uncaught_exception

Function handle_uncaught_exception

django/core/handlers/exception.py:174–187  ·  view source on GitHub ↗

Processing for any otherwise uncaught exceptions (those that will generate HTTP 500 responses).

(request, resolver, exc_info)

Source from the content-addressed store, hash-verified

172
173
174def handle_uncaught_exception(request, resolver, exc_info):
175 """
176 Processing for any otherwise uncaught exceptions (those that will
177 generate HTTP 500 responses).
178 """
179 if settings.DEBUG_PROPAGATE_EXCEPTIONS:
180 raise
181
182 if settings.DEBUG:
183 return debug.technical_500_response(request, *exc_info)
184
185 # Return an HttpResponse that displays a friendly error message.
186 callback = resolver.resolve_error_handler(500)
187 return callback(request)

Callers 2

response_for_exceptionFunction · 0.85
get_exception_responseFunction · 0.85

Calls 2

callbackFunction · 0.85
resolve_error_handlerMethod · 0.80

Tested by

no test coverage detected