Edgewall Software

Opened 12 years ago

Closed 12 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:


TypeErrors are supressed when raised from within a py:def function.


>>> 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)
        &lt;generator object at 0x833266c&gt;</div>

I expected the TypeError to be propagated, as it is when called normally (ie not inside a py:def block).

Attachments (0)

Change History (1)

comment:1 Changed 12 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from new to closed

Should be fixed in [256].

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain cmlenz.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.