Code

Ticket #11461: template-fix-lost-traceback.diff

File template-fix-lost-traceback.diff, 563 bytes (added by Glenn, 5 years ago)
Line 
1Index: django/template/debug.py
2===================================================================
3--- django/template/debug.py    (revision 10645)
4+++ django/template/debug.py    (working copy)
5@@ -78,7 +78,7 @@
6             wrapped = TemplateSyntaxError(u'Caught an exception while rendering: %s' % force_unicode(e, errors='replace'))
7             wrapped.source = node.source
8             wrapped.exc_info = exc_info()
9-            raise wrapped
10+            raise wrapped, None, wrapped.exc_info[2]
11         return result
12 
13 class DebugVariableNode(VariableNode):