Răsfoiți Sursa

Tweaked exception-handling middleware to preserve tracebacks

Jeremy Stretch 8 ani în urmă
părinte
comite
2519ebff9d
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      netbox/utilities/middleware.py

+ 2 - 2
netbox/utilities/middleware.py

@@ -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):