Package net.sf.basedb.clients.web
Class WebException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- net.sf.basedb.clients.web.WebException
-
- All Implemented Interfaces:
Serializable
public class WebException extends Exception
This exception can be thrown on any JSP page in BASE. It will be catched by the server and execution is transferred to/exception/web.jsp
page which will display the error message in a user friendly format.- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WebException(String pageType, String title, String detail)
Create a newWebException
.WebException(String pageType, String title, String detail, Object... parameters)
Create a newWebException
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDetail()
Get the detailed description of the error message.String
getPageType()
Get the page type to display the error message in.String
getTitle()
Get the title of the error message.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
title
private String title
The title of the error message.
-
detail
private String detail
A more detailed description of the error message.
-
pageType
private String pageType
The type of page to display the error message in.
-
-
Constructor Detail
-
WebException
public WebException(String pageType, String title, String detail)
Create a newWebException
.- Parameters:
pageType
- The type of page to use for the error message, the valid values are defined by the<base:page<
taglibtitle
- The title of the error messagedetail
- A detailed description of the error
-
WebException
public WebException(String pageType, String title, String detail, Object... parameters)
Create a newWebException
.- Parameters:
pageType
- The type of page to use for the error message, the valid values are defined by the<base:page<
taglibtitle
- The title of the error messagedetail
- A detailed description of the error, including parameter placeholders of the form {1}, {2}, etc.parameters
- An array of parameters, which will replace the placeholders in the detailed message
-
-
Method Detail
-
getPageType
public String getPageType()
Get the page type to display the error message in. This value is used in the <base:page type="..."> tag.
-
getTitle
public String getTitle()
Get the title of the error message.
-
getDetail
public String getDetail()
Get the detailed description of the error message.
-
-