org.loom.exception
Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.loom.exception.HttpException
- All Implemented Interfaces:
- java.io.Serializable, HttpThrowable
- Direct Known Subclasses:
- RuntimeFileNotFoundException
public class HttpException
- extends java.lang.RuntimeException
- implements HttpThrowable
This exception can be used at any moment to return the specified HTTP error code to the browser.
The browser will be pesented with a generic HTTP error page, but the system log
will log the real cause (the provided error message)
- See Also:
- Serialized Form
Constructor Summary |
HttpException(int httpError,
java.lang.String message)
|
HttpException(int httpError,
java.lang.String message,
java.lang.Throwable cause)
|
HttpException(int httpError,
java.lang.Throwable cause)
|
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 |
HttpException
public HttpException(int httpError,
java.lang.String message)
- Parameters:
httpError
- the http error code to be returned to the browsermessage
- the error message that will be logged in the system log (not presented to the browser)
HttpException
public HttpException(int httpError,
java.lang.String message,
java.lang.Throwable cause)
- Parameters:
httpError
- the http error code to be returned to the browsermessage
- the error message that will be logged in the system log (not presented to the browser)
HttpException
public HttpException(int httpError,
java.lang.Throwable cause)
- Parameters:
httpError
- the http error code to be returned to the browsercause
- the cause of this exception
getHttpError
public int getHttpError()
- Specified by:
getHttpError
in interface HttpThrowable
- Returns:
- the HTTP error code that should be returned to the browser for this error.