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, Throwable cause)
WebException(HttpStatus status, Throwable cause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WebException
badRequest(String message)
static WebException
forbidden(String message)
HttpStatus
getStatus()
static WebException
internalServerError(String message)
static WebException
notFound(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, Throwable cause)
-
WebException
public WebException(HttpStatus status, String message, Throwable cause)
-
-
Method Detail
-
getStatus
public HttpStatus getStatus()
-
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)
-
-