Corrected docs and removed unused code for got_request_exception signal's sender argument.
Inaccurate since 7d1b69dbe7
.
This commit is contained in:
parent
cafb34963c
commit
3529d0eabf
|
@ -102,12 +102,12 @@ def response_for_exception(request, exc):
|
|||
return response
|
||||
|
||||
|
||||
def get_exception_response(request, resolver, status_code, exception, sender=None):
|
||||
def get_exception_response(request, resolver, status_code, exception):
|
||||
try:
|
||||
callback, param_dict = resolver.resolve_error_handler(status_code)
|
||||
response = callback(request, **{**param_dict, 'exception': exception})
|
||||
except Exception:
|
||||
signals.got_request_exception.send(sender=sender, request=request)
|
||||
signals.got_request_exception.send(sender=None, request=request)
|
||||
response = handle_uncaught_exception(request, resolver, sys.exc_info())
|
||||
|
||||
return response
|
||||
|
|
|
@ -547,7 +547,7 @@ This signal is sent whenever Django encounters an exception while processing an
|
|||
Arguments sent with this signal:
|
||||
|
||||
``sender``
|
||||
The handler class, as above.
|
||||
Unused (always ``None``).
|
||||
|
||||
``request``
|
||||
The :class:`~django.http.HttpRequest` object.
|
||||
|
|
Loading…
Reference in New Issue