[CMF-checkins] CVS: CMF/CMFCore - FSPageTemplate.py:1.15
Brian Lloyd
brian@zope.com
Mon, 23 Sep 2002 10:23:39 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv20852
Modified Files:
FSPageTemplate.py
Log Message:
Fixed bug in error handling that hid errors with "unsubscriptable object" :(
=== CMF/CMFCore/FSPageTemplate.py 1.14 => 1.15 ===
--- CMF/CMFCore/FSPageTemplate.py:1.14 Thu Sep 5 16:45:26 2002
+++ CMF/CMFCore/FSPageTemplate.py Mon Sep 23 10:23:39 2002
@@ -17,7 +17,7 @@
from string import split, replace
from os import stat
-import re
+import re, sys
import Globals, Acquisition
from DateTime import DateTime
@@ -143,8 +143,10 @@
except RuntimeError:
if Globals.DevelopmentMode:
err = FSPageTemplate.inheritedAttribute( 'pt_errors' )( self )
+ if not err:
+ err = sys.exc_info()
err_type = err[0]
- err_msg = '<pre>%s</pre>' % replace( err[1], "\'", "'" )
+ err_msg = '<pre>%s</pre>' % replace( str(err[1]), "\'", "'" )
msg = 'FS Page Template %s has errors: %s.<br>%s' % (
self.id, err_type, html_quote(err_msg) )
raise RuntimeError, msg