mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Fixed #1647 -- Included slightly more information in template syntax error
displays in DebugNodeList. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
271093d3b3
commit
466b90c788
@ -708,9 +708,9 @@ class DebugNodeList(NodeList):
|
||||
if not hasattr(e, 'source'):
|
||||
e.source = node.source
|
||||
raise
|
||||
except Exception:
|
||||
except Exception, e:
|
||||
from sys import exc_info
|
||||
wrapped = TemplateSyntaxError('Caught an exception while rendering.')
|
||||
wrapped = TemplateSyntaxError('Caught an exception while rendering: %s' % e)
|
||||
wrapped.source = node.source
|
||||
wrapped.exc_info = exc_info()
|
||||
raise wrapped
|
||||
|
Loading…
Reference in New Issue
Block a user