public class HttpException extends AbstractRuntimeException
Constructor and Description |
---|
HttpException(int statusCode,
String message)
Constructs an
HttpException with the specified HTTP status code and message. |
HttpException(int statusCode,
String message,
Throwable cause)
Constructs an
HttpException with the specified HTTP status code, message and cause. |
HttpException(String message)
Constructs an
HttpException with the specified message. |
HttpException(String message,
Throwable cause)
Constructs an
HttpException with the specified message and cause. |
Modifier and Type | Method and Description |
---|---|
int |
getStatusCode()
Return the HTTP status code associated with this exception, if one exists.
|
getMessage, getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public HttpException(String message)
HttpException
with the specified message.message
- the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage()
method).public HttpException(int statusCode, String message)
HttpException
with the specified HTTP status code and message.statusCode
- the HTTP status codemessage
- the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage()
method).public HttpException(int statusCode, String message, Throwable cause)
HttpException
with the specified HTTP status code, message and cause.statusCode
- the HTTP status codemessage
- the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage()
method).cause
- the cause (which is saved for later retrieval by the Throwable.getCause()
method). (A null
value is permitted, and indicates that the cause is nonexistent or unknown.)public HttpException(String message, Throwable cause)
HttpException
with the specified message and cause.message
- the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage()
method).cause
- the cause (which is saved for later retrieval by the Throwable.getCause()
method). (A null
value is permitted, and indicates that the cause is nonexistent or unknown.)<i>Copyright (c) 2020, SAS Institute Inc., Cary, NC, USA</i>