Name
TryCatchFinally
Synopsis
The
TryCatchFinally
interface provides methods for handling exceptions thrown while
evaluating the body of an action element and can be implemented a tag
handler in addition to one of the main tag handler interfaces:
Tag, IterationTag, and
BodyTag.
Synopsis
|
Interface Name: |
|
|
Extends: |
None |
|
Implemented by: |
Custom action tag handler classes. |
Methods
-
public void doCatch(Throwable exception) throws Throwable Handles the specified exception and may optionally rethrow the same exception or a new exception. This method is invoked by the container if an exception is thrown when evaluating the body or by
doStartTag( ),doEndTag( ),doInitBody( ), ordoAfterBody( ).-
public void doFinally( ) Typically clears per-invocation state, such as closing expensive resources used only while processing one occurrence of the corresponding action element. This method is invoked after
doEndTag( )or afterdoCatch( )if an exception is thrown when evaluating the body or bydoStartTag( ),doEndTag( ),doInitBody( ), ordoAfterBody( ).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access