Index: django/views/debug.py
===================================================================
--- django/views/debug.py	(revision 16730)
+++ django/views/debug.py	(working copy)
@@ -223,8 +223,7 @@
                     'loader': loader_name,
                     'templates': template_list,
                 })
-        if (settings.TEMPLATE_DEBUG and hasattr(self.exc_value, 'source') and
-            isinstance(self.exc_value, TemplateSyntaxError)):
+        if (settings.TEMPLATE_DEBUG and hasattr(self.exc_value, 'source_template_node')):
             self.get_template_exception_info()
 
         frames = self.get_traceback_frames()
@@ -268,7 +267,7 @@
         return t.render(c)
 
     def get_template_exception_info(self):
-        origin, (start, end) = self.exc_value.source
+        origin, (start, end) = self.exc_value.source_template_node
         template_source = origin.reload()
         context_lines = 10
         line = 0
@@ -626,7 +625,7 @@
 {% endif %}
 {% if template_info %}
 <div id="template">
-   <h2>Template error</h2>
+   <h2>Error occured during template rendering</h2>
    <p>In template <code>{{ template_info.name }}</code>, error at line <strong>{{ template_info.line }}</strong></p>
    <h3>{{ template_info.message }}</h3>
    <table class="source{% if template_info.top %} cut-top{% endif %}{% ifnotequal template_info.bottom template_info.total %} cut-bottom{% endifnotequal %}">
Index: django/template/debug.py
===================================================================
--- django/template/debug.py	(revision 16730)
+++ django/template/debug.py	(working copy)
@@ -4,6 +4,7 @@
 from django.utils.safestring import SafeData, EscapeData
 from django.utils.formats import localize
 
+
 class DebugLexer(Lexer):
     def __init__(self, template_string, origin):
         super(DebugLexer, self).__init__(template_string, origin)
@@ -42,9 +43,9 @@
     def error(self, token, msg):
         return self.source_error(token.source, msg)
 
-    def source_error(self, source,msg):
+    def source_error(self, source, msg):
         e = TemplateSyntaxError(msg)
-        e.source = source
+        e.source_template_node = source #Identify the template node that was being rendered when the error occurred.
         return e
 
     def create_nodelist(self):
@@ -67,20 +68,21 @@
             e.source = token.source
 
 class DebugNodeList(NodeList):
+    '''
+    A list of nodes that is instantiated when debug is True - this is the nerve center of exceptions that occur during template rendering. 
+    '''
     def render_node(self, node, context):
         try:
             result = node.render(context)
         except TemplateSyntaxError, e:
-            if not hasattr(e, 'source'):
-                e.source = node.source
-            raise
+            if not hasattr(e, 'source_template_node'): #Have we already identified the node where the problem occured?
+                e.source_template_node = node.source #...if so, let's annotate the exception with that.
+            raise        
         except Exception, e:
             from sys import exc_info
-            wrapped = TemplateSyntaxError(u'Caught %s while rendering: %s' %
-                (e.__class__.__name__, force_unicode(e, errors='replace')))
-            wrapped.source = getattr(e, 'template_node_source', node.source)
-            wrapped.exc_info = exc_info()
-            raise wrapped, None, wrapped.exc_info[2]
+            e.source_template_node = getattr(e, 'template_node_source', node.source) #Again, annotating the exception with the node 
+            e.exc_info = exc_info()
+            raise e, None, e.exc_info[2] #Make sure that ExceptionReporter gets the traceback
         return result
 
 class DebugVariableNode(VariableNode):
Index: django/views/debug.py
===================================================================
--- django/views/debug.py	(revision 16741)
+++ django/views/debug.py	(working copy)
@@ -223,8 +223,7 @@
                     'loader': loader_name,
                     'templates': template_list,
                 })
-        if (settings.TEMPLATE_DEBUG and hasattr(self.exc_value, 'source') and
-            isinstance(self.exc_value, TemplateSyntaxError)):
+        if (settings.TEMPLATE_DEBUG and hasattr(self.exc_value, 'source_template_node')):
             self.get_template_exception_info()
 
         frames = self.get_traceback_frames()
@@ -268,7 +267,7 @@
         return t.render(c)
 
     def get_template_exception_info(self):
-        origin, (start, end) = self.exc_value.source
+        origin, (start, end) = self.exc_value.source_template_node
         template_source = origin.reload()
         context_lines = 10
         line = 0
@@ -626,7 +625,7 @@
 {% endif %}
 {% if template_info %}
 <div id="template">
-   <h2>Template error</h2>
+   <h2>Error occured during template rendering</h2>
    <p>In template <code>{{ template_info.name }}</code>, error at line <strong>{{ template_info.line }}</strong></p>
    <h3>{{ template_info.message }}</h3>
    <table class="source{% if template_info.top %} cut-top{% endif %}{% ifnotequal template_info.bottom template_info.total %} cut-bottom{% endifnotequal %}">
Index: django/template/debug.py
===================================================================
--- django/template/debug.py	(revision 16741)
+++ django/template/debug.py	(working copy)
@@ -4,6 +4,7 @@
 from django.utils.safestring import SafeData, EscapeData
 from django.utils.formats import localize
 
+
 class DebugLexer(Lexer):
     def __init__(self, template_string, origin):
         super(DebugLexer, self).__init__(template_string, origin)
@@ -42,9 +43,9 @@
     def error(self, token, msg):
         return self.source_error(token.source, msg)
 
-    def source_error(self, source,msg):
+    def source_error(self, source, msg):
         e = TemplateSyntaxError(msg)
-        e.source = source
+        e.source_template_node = source #Identify the template node that was being rendered when the error occurred.
         return e
 
     def create_nodelist(self):
@@ -67,20 +68,21 @@
             e.source = token.source
 
 class DebugNodeList(NodeList):
+    '''
+    A list of nodes that is instantiated when debug is True - this is the nerve center of exceptions that occur during template rendering. 
+    '''
     def render_node(self, node, context):
         try:
             result = node.render(context)
         except TemplateSyntaxError, e:
-            if not hasattr(e, 'source'):
-                e.source = node.source
-            raise
+            if not hasattr(e, 'source_template_node'): #Have we already identified the node where the problem occured?
+                e.source_template_node = node.source #...if so, let's annotate the exception with that.
+            raise        
         except Exception, e:
             from sys import exc_info
-            wrapped = TemplateSyntaxError(u'Caught %s while rendering: %s' %
-                (e.__class__.__name__, force_unicode(e, errors='replace')))
-            wrapped.source = getattr(e, 'template_node_source', node.source)
-            wrapped.exc_info = exc_info()
-            raise wrapped, None, wrapped.exc_info[2]
+            e.source_template_node = getattr(e, 'template_node_source', node.source) #Again, annotating the exception with the node 
+            e.exc_info = exc_info()
+            raise e, None, e.exc_info[2] #Make sure that ExceptionReporter gets the traceback
         return result
 
 class DebugVariableNode(VariableNode):
