Package com.enonic.xp.web
Class WebException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.enonic.xp.web.WebException
-
- All Implemented Interfaces:
Serializable
public final class WebException extends RuntimeException
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WebException(HttpStatus status, String message)WebException(HttpStatus status, String message, boolean loggable)WebException(HttpStatus status, String message, Throwable cause)WebException(HttpStatus status, Throwable cause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WebExceptionbadRequest(String message)static WebExceptionforbidden(String message)HttpStatusgetStatus()static WebExceptioninternalServerError(String message)booleanisLoggable()static WebExceptionnotFound(String message)-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
WebException
public WebException(HttpStatus status, String message)
-
WebException
public WebException(HttpStatus status, String message, boolean loggable)
-
WebException
public WebException(HttpStatus status, Throwable cause)
-
WebException
public WebException(HttpStatus status, String message, Throwable cause)
-
-
Method Detail
-
getStatus
public HttpStatus getStatus()
-
isLoggable
public boolean isLoggable()
-
badRequest
public static WebException badRequest(String message)
-
forbidden
public static WebException forbidden(String message)
-
notFound
public static WebException notFound(String message)
-
internalServerError
public static WebException internalServerError(String message)
-
-