2.17.2: 2011-06-17

net.sf.basedb.clients.web
Class WebException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by 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

Field Summary
private  String detail
          A more detailed description of the error message.
private  String pageType
          The type of page to display the error message in.
private static long serialVersionUID
           
private  String title
          The title of the error message.
 
Constructor Summary
WebException(String pageType, String title, String detail)
          Create a new WebException.
WebException(String pageType, String title, String detail, Object... parameters)
          Create a new WebException.
 
Method Summary
 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
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 new WebException.

Parameters:
pageType - The type of page to use for the error message, the valid values are defined by the <base:page< taglib
title - The title of the error message
detail - A detailed description of the error

WebException

public WebException(String pageType,
                    String title,
                    String detail,
                    Object... parameters)
Create a new WebException.

Parameters:
pageType - The type of page to use for the error message, the valid values are defined by the <base:page< taglib
title - The title of the error message
detail - 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.


2.17.2: 2011-06-17