Edgewall Software

Ticket #44 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

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).


Change History

Changed 9 years ago by cmlenz

  • status changed from new to closed
  • resolution set to fixed

Should be fixed in [256].

Add/Change #44 (Error reporting fails in py:def when TypeError is raised)


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

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'
Note: See TracTickets for help on using tickets.