1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #8136: Added a signal emission when an error is raised handling an error. This was required for the test client to handle missing 404.html templates and errors in the 404.html template. Thanks to danfairs for the report and fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2008-08-22 13:59:41 +00:00
parent 462ee405fb
commit e054295fed
3 changed files with 35 additions and 1 deletions

View File

@@ -112,7 +112,10 @@ class BaseHandler(object):
callback, param_dict = resolver.resolve404()
return callback(request, **param_dict)
except:
return self.handle_uncaught_exception(request, resolver, sys.exc_info())
try:
return self.handle_uncaught_exception(request, resolver, sys.exc_info())
finally:
receivers = signals.got_request_exception.send(sender=self.__class__, request=request)
except exceptions.PermissionDenied:
return http.HttpResponseForbidden('<h1>Permission denied</h1>')
except SystemExit: