From 466b90c788bbeb37f717555260701db0001db41b Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 19 Jul 2006 12:32:32 +0000 Subject: [PATCH] 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 --- django/template/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/template/__init__.py b/django/template/__init__.py index e898fc7636..ea82a4697f 100644 --- a/django/template/__init__.py +++ b/django/template/__init__.py @@ -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