[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py Make page templates actually *show* the error they're complaining about in the error output.

Chris McDonough chrism at plope.com
Tue Oct 11 13:05:58 EDT 2005


Log message for revision 39051:
  Make page templates actually *show* the error they're complaining about in the error output.
  

Changed:
  U   Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py

-=-
Modified: Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py
===================================================================
--- Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py	2005-10-11 16:53:17 UTC (rev 39050)
+++ Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py	2005-10-11 17:05:57 UTC (rev 39051)
@@ -91,7 +91,9 @@
         __traceback_supplement__ = (PageTemplateTracebackSupplement, self)
 
         if self._v_errors:
-            raise PTRuntimeError, 'Page Template %s has errors.' % self.id
+            e = str(self._v_errors)
+            raise PTRuntimeError, (
+                'Page Template %s has errors: %s' % (self.id, e))
         output = self.StringIO()
         c = self.pt_getContext()
         c.update(extra_context)



More information about the Zope-Checkins mailing list