Django

Code

Changeset 7068

Show
Ignore:
Timestamp:
02/02/08 22:06:35 (7 months ago)
Author:
mtredinnick
Message:

Fixed #6305 -- Always emit the got_request_exception signal, even when
DEBUG=True. Patch from Collin Anderson.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/AUTHORS

    r7008 r7068  
    4646    Daniel Alves Barbosa de Oliveira Vaz <danielvaz@gmail.com> 
    4747    AgarFu <heaven@croasanaso.sytes.net> 
     48    Collin Anderson <cmawebsite@gmail.com> 
    4849    Andreas 
    4950    andy@jadedplanet.net 
  • django/trunk/django/core/handlers/base.py

    r6826 r7068  
    112112            pass # See http://code.djangoproject.com/ticket/1023 
    113113        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) 
    114117            if settings.DEBUG: 
    115118                from django.views import debug 
    116                 return debug.technical_500_response(request, *sys.exc_info()
     119                return debug.technical_500_response(request, *exc_info
    117120            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) 
    121121                # When DEBUG is False, send an error message to the admins. 
    122122                subject = 'Error (%s IP): %s' % ((request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS and 'internal' or 'EXTERNAL'), request.path)