Ticket #27397: excep.diff

File excep.diff, 833 bytes (added by Ramin Farajpour Cami, 8 years ago)
  • django/core/handlers/exception.py

    diff --git a/django/core/handlers/exception.py b/django/core/handlers/exception.py
    index f1c7b57..5732550 100644
    a b def response_for_exception(request, exc):  
    8080        # Allow sys.exit() to actually exit. See tickets #1023 and #4701
    8181        raise
    8282
     83    elif exc:
     84            # Check all exception from request
     85            if settings.DEBUG:
     86                response = debug.technical_404_response(request, exc)
     87            else:
     88                response = get_exception_response(request, get_resolver(get_urlconf()), 404, exc)
     89
    8390    else:
    8491        signals.got_request_exception.send(sender=None, request=request)
    8592        response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
Back to Top