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
1 changed files with 2 additions and 2 deletions

View File

@ -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