Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #6423 -- Don't fall in a hole in the debug screen if somebody r…

…aises an old-fashioned string exception. Thanks, guettli.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 787acefc73ab458896cd646b0540ea9354ddee41 1 parent 8b29767
@malcolmt malcolmt authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 django/views/debug.py
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.