1
0
mirror of https://github.com/django/django.git synced 2024-12-23 09:36:06 +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:
Malcolm Tredinnick 2006-07-19 12:32:32 +00:00
parent 271093d3b3
commit 466b90c788

View File

@ -708,9 +708,9 @@ class DebugNodeList(NodeList):
if not hasattr(e, 'source'): if not hasattr(e, 'source'):
e.source = node.source e.source = node.source
raise raise
except Exception: except Exception, e:
from sys import exc_info 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.source = node.source
wrapped.exc_info = exc_info() wrapped.exc_info = exc_info()
raise wrapped raise wrapped