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