Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 050b8a436a3016b0211333be3b5ecf7a098fc4bf 1 parent 3815ff7
Malcolm Tredinnick authored February 03, 2008
1  AUTHORS
@@ -45,6 +45,7 @@ answer newbie questions, and generally made Django that much better:
45 45
     Marty Alchin <gulopine@gamemusic.org>
46 46
     Daniel Alves Barbosa de Oliveira Vaz <danielvaz@gmail.com>
47 47
     AgarFu <heaven@croasanaso.sytes.net>
  48
+    Collin Anderson <cmawebsite@gmail.com>
48 49
     Andreas
49 50
     andy@jadedplanet.net
50 51
     Fabrice Aneche <akh@nobugware.com>
8  django/core/handlers/base.py
@@ -111,13 +111,13 @@ def get_response(self, request):
111 111
         except SystemExit:
112 112
             pass # See http://code.djangoproject.com/ticket/1023
113 113
         except: # Handle everything else, including SuspiciousOperation, etc.
  114
+            # Get the exception info now, in case another exception is thrown later.
  115
+            exc_info = sys.exc_info()
  116
+            receivers = dispatcher.send(signal=signals.got_request_exception, request=request)
114 117
             if settings.DEBUG:
115 118
                 from django.views import debug
116  
-                return debug.technical_500_response(request, *sys.exc_info())
  119
+                return debug.technical_500_response(request, *exc_info)
117 120
             else:
118  
-                # Get the exception info now, in case another exception is thrown later.
119  
-                exc_info = sys.exc_info()
120  
-                receivers = dispatcher.send(signal=signals.got_request_exception, request=request)
121 121
                 # When DEBUG is False, send an error message to the admins.
122 122
                 subject = 'Error (%s IP): %s' % ((request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS and 'internal' or 'EXTERNAL'), request.path)
123 123
                 try:

0 notes on commit 050b8a4

Please sign in to comment.
Something went wrong with that request. Please try again.