소스 검색

Tweaked exception-handling middleware to preserve tracebacks

Jeremy Stretch 8 년 전
부모
커밋
2519ebff9d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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):