net.sf.basedb.clients.web.taglib
Class ExceptionCatcher
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
net.sf.basedb.clients.web.taglib.ExceptionCatcher
- All Implemented Interfaces:
- Serializable, BodyTag, IterationTag, JspTag, Tag, TryCatchFinally
public class ExceptionCatcher
- extends BodyTagSupport
- implements TryCatchFinally
This tag is a wrapper that catches any errors in it's
body and outputs the error message.
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.
|
- Version:
- 2.9.1
- Author:
- Nicklas
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
clazz
private String clazz
ExceptionCatcher
public ExceptionCatcher()
setClazz
public void setClazz(String clazz)
getClazz
public String getClazz()
doEndTag
public int doEndTag()
throws JspException
- Specified by:
doEndTag
in interface Tag
- Overrides:
doEndTag
in class BodyTagSupport
- Throws:
JspException
doCatch
public void doCatch(Throwable t)
throws Throwable
- Specified by:
doCatch
in interface TryCatchFinally
- Throws:
Throwable
doFinally
public void doFinally()
- Specified by:
doFinally
in interface TryCatchFinally