Ticket #6305: got_request_exception_debug_true.patch
File got_request_exception_debug_true.patch, 1.3 KB (added by , 17 years ago) |
---|
-
core/handlers/base.py
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: