Ticket #8136: handlers-base-r8223

File handlers-base-r8223, 820 bytes (added by Dan Fairs, 16 years ago)

Patch that makes sure that got_request_exception is called

Line 
1Index: base.py
2===================================================================
3--- base.py (revision 8223)
4+++ base.py (working copy)
5@@ -112,7 +112,10 @@
6 callback, param_dict = resolver.resolve404()
7 return callback(request, **param_dict)
8 except:
9- return self.handle_uncaught_exception(request, resolver, sys.exc_info())
10+ try:
11+ return self.handle_uncaught_exception(request, resolver, sys.exc_info())
12+ finally:
13+ receivers = signals.got_request_exception.send(sender=self.__class__, request=request)
14 except exceptions.PermissionDenied:
15 return http.HttpResponseForbidden('<h1>Permission denied</h1>')
16 except SystemExit:
Back to Top