diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2008-08-22 13:59:41 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2008-08-22 13:59:41 +0000 |
| commit | e054295fed6a19a4e68fb50e71e0e57305a6770d (patch) | |
| tree | fb40a071d5825bcdda78061c7a9f10c7c4038031 /django | |
| parent | 462ee405fb646ee40d07e4d055b308bd1a835644 (diff) | |
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
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/handlers/base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py index 6a2d0645e0..b34d0e096e 100644 --- a/django/core/handlers/base.py +++ b/django/core/handlers/base.py @@ -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: |
