diff roundup/cgi/PageTemplates/PythonExpr.py @ 1065:0f9aa62917bd

much nicer error messages when there's a templating error
author Richard Jones <richard@users.sourceforge.net>
date Fri, 06 Sep 2002 07:21:31 +0000
parents b9988e118055
children c08b3820edd1
line wrap: on
line diff
--- a/roundup/cgi/PageTemplates/PythonExpr.py	Fri Sep 06 05:53:02 2002 +0000
+++ b/roundup/cgi/PageTemplates/PythonExpr.py	Fri Sep 06 07:21:31 2002 +0000
@@ -14,7 +14,7 @@
 """Generic Python Expression Handler
 """
 
-__version__='$Revision: 1.1 $'[11:-2]
+__version__='$Revision: 1.2 $'[11:-2]
 
 from TALES import CompilerError
 from string import strip, split, join, replace, lstrip
@@ -60,7 +60,7 @@
         return names
 
     def __call__(self, econtext):
-        __traceback_info__ = self.expr
+        __traceback_info__ = 'python expression "%s"'%self.expr
         f = self._f
         f.func_globals.update(self._bind_used_names(econtext))        
         return f()

Roundup Issue Tracker: http://roundup-tracker.org/