[Zope-Checkins] CVS: Zope3/lib/python/Zope/TAL - HTMLTALParser.py:1.35

Barry Warsaw barry@wooz.org
Mon, 17 Jun 2002 20:11:57 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/TAL
In directory cvs.zope.org:/tmp/cvs-serv22752/lib/python/Zope/TAL

Modified Files:
	HTMLTALParser.py 
Log Message:
parseFile(): Poke the offending filename into the TALError that can be
raised.  This helps debugging by including the broken .pt file in the
traceback information.


=== Zope3/lib/python/Zope/TAL/HTMLTALParser.py 1.34 => 1.35 ===
         data = f.read()
         f.close()
-        self.parseString(data)
+        try:
+            self.parseString(data)
+        except TALError, e:
+            e.setFile(file)
+            raise
 
     def parseString(self, data):
         self.feed(data)