Ticket #6305: got_request_exception_debug_true.patch

File got_request_exception_debug_true.patch, 1.3 KB (added by Collin Anderson <cmawebsite@…>, 17 years ago)

Patch against [6991] that sends the signal regardless of what settings.DEBUG is.

  • core/handlers/base.py

     
    111111        except SystemExit:
    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)
    123123                try:
Back to Top