org.liquidsite.app.servlet
Class RequestException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.liquidsite.app.servlet.RequestException
All Implemented Interfaces:
java.io.Serializable

public class RequestException
extends java.lang.Exception

A request exception. This exception is thrown when a request couldn't be processed normally. This can be due to various causes, such as authentification failure, inexistent resource, or internal errors. No new instances are created of this exception, but the existing ones are thrown instead.

See Also:
Serialized Form

Field Summary
static RequestException FORBIDDEN
          The forbidden access request error.
static RequestException INTERNAL_ERROR
          The internal error constant.
static RequestException RESOURCE_NOT_FOUND
          The resource not found request error.
static RequestException UNAUTHORIZED
          The unauthorized access request error.
 
Method Summary
 int getCode()
          Returns the HTTP error code.
 
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

INTERNAL_ERROR

public static final RequestException INTERNAL_ERROR
The internal error constant. This error is used when a problem was encountered during the request processing, making the normal request processing fail.


UNAUTHORIZED

public static final RequestException UNAUTHORIZED
The unauthorized access request error. This error is used when a request for a resource requires user authentification in order to be retrieved.


FORBIDDEN

public static final RequestException FORBIDDEN
The forbidden access request error. This error is used when the user wasn't authorized to access the requested resource.


RESOURCE_NOT_FOUND

public static final RequestException RESOURCE_NOT_FOUND
The resource not found request error. This error is used when the requested resource couldn't be found.

Method Detail

getCode

public int getCode()
Returns the HTTP error code.

Returns:
the HTTP error code