public class ExceptionCatcher extends BodyTagSupport implements TryCatchFinally
Example:
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> <base:catch"> Here is some code that may throw an exception... </base:catch>
Syntax:
<base:catch clazz=... >
Attribute | Default value | Required | Description |
clazz | inlineerror | no | If an exception is thrown the error message will be displayed inside a <div> with class set to this value. |
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
clazz |
private static long |
serialVersionUID |
bodyContent
id, pageContext
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
ExceptionCatcher() |
Modifier and Type | Method and Description |
---|---|
void |
doCatch(java.lang.Throwable t) |
int |
doEndTag() |
void |
doFinally() |
java.lang.String |
getClazz() |
void |
setClazz(java.lang.String clazz) |
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParent, setPageContext, setParent
private static final long serialVersionUID
private java.lang.String clazz
public void setClazz(java.lang.String clazz)
public java.lang.String getClazz()
public int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class BodyTagSupport
JspException
public void doCatch(java.lang.Throwable t) throws java.lang.Throwable
doCatch
in interface TryCatchFinally
java.lang.Throwable
public void doFinally()
doFinally
in interface TryCatchFinally