[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - PageTemplate.py:1.1.2.7

Jim Fulton jim@zope.com
Thu, 3 Jan 2002 14:22:47 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv16160

Modified Files:
      Tag: Zope-3x-branch
	PageTemplate.py 
Log Message:
A runtime error will occur if you attempt to render after a compiler
error. Modified the exception to actually include the compile error
information.


=== Zope3/lib/python/Zope/PageTemplate/PageTemplate.py 1.1.2.6 => 1.1.2.7 ===
         """Render this Page Template"""
         if self._v_errors:
-            raise PTRuntimeError, 'Page Template %s has errors.' % self.id
+            raise PTRuntimeError(
+                '''Page Template %s has errors.
+                %s
+                ''' % ('', #XXX self.id
+                       self._v_errors))
         output = StringIO()
         c = self.pt_getContext()
         c.update(extra_context)