Glasnost Help and Documentation
Developers
Templates
TAL and METAL
TAL
TAL Statements: on-error





TAL Statements: on-error
When an error occurs, the TAL interpreter looks for an on-error statement in the same element, in the enclosing element, etc. The first on-error directive is invoked. It is treated as a content statement.
Example
<div tal:on-error="'An error has occured.'"> <p>A paragraph.</p> <p tal:content="42/0">Impossible division.</p> </div>