Opened 18 years ago
Closed 18 years ago
#44 closed defect (fixed)
Error reporting fails in py:def when TypeError is raised
Reported by: | oliver.cope@… | Owned by: | cmlenz |
---|---|---|---|
Priority: | minor | Milestone: | 0.3 |
Component: | Expression evaluation | Version: | 0.2 |
Keywords: | Cc: |
Description
TypeErrors are supressed when raised from within a py:def function.
Example:
>>> >>> def badfunc(): ... raise TypeError ... >>> template = Template(""" ... <html xmlns:py="http://markup.edgewall.org/"> ... <div py:def="dobadfunc()"> ... ${badfunc()} ... </div> ... <div py:content="dobadfunc()"/> ... </html> ... """) >>> print template.generate(badfunc=badfunc) <html> <div><div> <generator object at 0x833266c></div> </html>
I expected the TypeError to be propagated, as it is when called normally (ie not inside a py:def block).
Change History (1)
comment:1 Changed 18 years ago by cmlenz
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Should be fixed in [256].