in core/src/main/java/org/apache/commons/jelly/tags/core/CatchTag.java [53:98]
public void doTag(XMLOutput output) throws JellyTagException {
/**
* Buid exception set
*/
if ( exceptionArray == null ) {
try {
buildExceptionArray();
} catch (ClassNotFoundException e) {
throw new JellyTagException(e);
}
}
if (var != null) {
context.removeVariable(var);
}
if ( cause != null ) {
context.removeVariable(cause);
}
try {
invokeBody(output);
}
catch (Throwable t) {
if (var != null) {
context.setVariable(var, t);
}
Throwable c = getRealException(t);
if ( cause != null ) {
context.setVariable( cause, c );
}
if ( exceptionArray != null ) {
/**
* if exception is not expected throw exception
*/
if ( ! isExpected(c)) {
throw new JellyTagException(t);
}
}
}
}