diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-02-03 04:06:35 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-02-03 04:06:35 +0000 |
| commit | 050b8a436a3016b0211333be3b5ecf7a098fc4bf (patch) | |
| tree | b51ac72bb3c0e7e1cdfb7b8a675c1dcc25006ac7 | |
| parent | 3815ff7ec5c9cf5e38f10673f6d2cd124e8c3fb4 (diff) | |
Fixed #6305 -- Always emit the got_request_exception signal, even when
DEBUG=True. Patch from Collin Anderson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | AUTHORS | 1 | ||||
| -rw-r--r-- | django/core/handlers/base.py | 8 |
2 files changed, 5 insertions, 4 deletions
@@ -45,6 +45,7 @@ answer newbie questions, and generally made Django that much better: Marty Alchin <gulopine@gamemusic.org> Daniel Alves Barbosa de Oliveira Vaz <danielvaz@gmail.com> AgarFu <heaven@croasanaso.sytes.net> + Collin Anderson <cmawebsite@gmail.com> Andreas andy@jadedplanet.net Fabrice Aneche <akh@nobugware.com> diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py index 17a24d6f60..7f68946f3d 100644 --- a/django/core/handlers/base.py +++ b/django/core/handlers/base.py @@ -111,13 +111,13 @@ class BaseHandler(object): except SystemExit: pass # See http://code.djangoproject.com/ticket/1023 except: # Handle everything else, including SuspiciousOperation, etc. + # Get the exception info now, in case another exception is thrown later. + exc_info = sys.exc_info() + receivers = dispatcher.send(signal=signals.got_request_exception, request=request) if settings.DEBUG: from django.views import debug - return debug.technical_500_response(request, *sys.exc_info()) + return debug.technical_500_response(request, *exc_info) else: - # Get the exception info now, in case another exception is thrown later. - exc_info = sys.exc_info() - receivers = dispatcher.send(signal=signals.got_request_exception, request=request) # When DEBUG is False, send an error message to the admins. subject = 'Error (%s IP): %s' % ((request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS and 'internal' or 'EXTERNAL'), request.path) try: |
