Tweaked exception-handling middleware to preserve tracebacks

This commit is contained in:
Jeremy Stretch 2017-11-06 17:48:13 -05:00
parent c33775d71e
commit 2519ebff9d

View File

@ -57,9 +57,9 @@ class ExceptionHandlingMiddleware(object):
def process_exception(self, request, exception):
# Raise exceptions if in debug mode
# Don't catch exceptions when in debug mode
if settings.DEBUG:
raise exception
return
# Determine the type of exception
if isinstance(exception, ProgrammingError):