summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-02-03 02:24:56 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-02-03 02:24:56 +0000
commit787acefc73ab458896cd646b0540ea9354ddee41 (patch)
tree969754554aee178a36e85ac6d9d26aff90938a38
parent8b29767f3f9d144a3e5cc8506db5acb25aa2d542 (diff)
Fixed #6423 -- Don't fall in a hole in the debug screen if somebody raises an old-fashioned string exception. Thanks, guettli.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/views/debug.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/django/views/debug.py b/django/views/debug.py
index 7322682e89..b7ac12db38 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -73,6 +73,12 @@ def technical_500_response(request, exc_type, exc_value, tb):
template_info = None
template_does_not_exist = False
loader_debug_info = None
+
+ # Handle deprecated string exceptions
+ if isinstance(exc_type, basestring):
+ exc_value = Exception('Deprecated String Exception: %r' % exc_type)
+ exc_type = type(exc_value)
+
if issubclass(exc_type, TemplateDoesNotExist):
from django.template.loader import template_source_loaders
template_does_not_exist = True