[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/pagetemplate/interfaces.py Add pt_errors() and pt_warnings() to IPageTemplate.

Fred L. Drake, Jr. fred at zope.com
Wed Jul 7 16:24:19 EDT 2004


Log message for revision 26187:
Add pt_errors() and pt_warnings() to IPageTemplate.
Fix incomplete sentence.

(Merged revisions 26185, 26186 from the trunk.)



-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/pagetemplate/interfaces.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/pagetemplate/interfaces.py	2004-07-07 20:22:09 UTC (rev 26186)
+++ Zope3/branches/ZopeX3-3.0/src/zope/pagetemplate/interfaces.py	2004-07-07 20:24:18 UTC (rev 26187)
@@ -35,6 +35,26 @@
         """Set the source and content type
         """
 
+    def pt_errors(namespace):
+        """Return a sequence of strings that describe errors in the template.
+
+        The errors may occur when the template is compiled or
+        rendered.
+
+        `namespace` is the set of names passed to the TALES expression
+        evaluator, similar to what's returned by pt_getContext().
+
+        This can be used to let a template author know what went wrong
+        when an attempt was made to render the template.
+        """
+
+    def pt_warnings():
+        """Return a sequence of warnings from the parser.
+
+        This can be useful to present to the template author to
+        indication forward compatibility problems with the template.
+        """
+
     def read():
         """Get the template source
         """
@@ -56,7 +76,7 @@
         """
 
     def pt_getEngine():
-        """Returns the TALES expression
+        """Returns the TALES expression evaluator.
         """
 
     def pt_getEngineContext(namespace):



More information about the Zope3-Checkins mailing list