[ZPT] CVS: Releases/Zope/lib/python/Products/PageTemplates - PageTemplate.py:1.17
Evan Simpson
evan@zope.com
Mon, 12 Nov 2001 11:53:50 -0500
Update of /cvs-repository/Releases/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv28333
Modified Files:
PageTemplate.py
Log Message:
Subclass RuntimeError to allow it to be distinguished from Python problems.
=== Releases/Zope/lib/python/Products/PageTemplates/PageTemplate.py 1.16 => 1.17 ===
"""Render this Page Template"""
if self._v_errors:
- raise RuntimeError, 'Page Template %s has errors.' % self.id
+ raise PTRuntimeError, 'Page Template %s has errors.' % self.id
output = StringIO()
c = self.pt_getContext()
c.update(extra_context)
@@ -235,3 +235,7 @@
return mod
ModuleImporter = _ModuleImporter()
+
+class PTRuntimeError(RuntimeError):
+ '''The Page Template has template errors that prevent it from rendering.'''
+ pass