Update of /cvs-repository/Packages/TAL In directory cvs.zope.org:/tmp/cvs-serv1857/lib/python/TAL
Modified Files: Tag: zc-Zope-2-7-5 TALInterpreter.py Log Message: add tests for on-error handling in macros for errors in slot fillers; errors in the filler can now be handled by the macro, as intended === Packages/TAL/TALInterpreter.py 1.78.4.7 => 1.78.4.7.24.1 === --- Packages/TAL/TALInterpreter.py:1.78.4.7 Thu Aug 12 12:15:14 2004 +++ Packages/TAL/TALInterpreter.py Tue Mar 14 12:48:21 2006 @@ -691,11 +691,13 @@ slot = slots.get(slotName) if slot is not None: prev_source = self.sourceFile - self.interpret(slot) - if self.sourceFile != prev_source: - self.engine.setSourceFile(prev_source) - self.sourceFile = prev_source - self.pushMacro(macroName, slots, entering=0) + try: + self.interpret(slot) + finally: + if self.sourceFile != prev_source: + self.engine.setSourceFile(prev_source) + self.sourceFile = prev_source + self.pushMacro(macroName, slots, entering=0) return self.pushMacro(macroName, slots) # Falling out of the 'if' allows the macro to be interpreted. _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins