public class HttpStatusCodeException extends HttpException
InvalidHttpMessageException with HTTP status code.| Constructor and Description |
|---|
HttpStatusCodeException(int statusCode)
Constructor with status code
|
HttpStatusCodeException(int statusCode,
String message)
Constructor with error message
|
HttpStatusCodeException(int statusCode,
String message,
Throwable cause)
Constructor with error message and nested exception
|
HttpStatusCodeException(int statusCode,
Throwable cause)
Constructor with nested exception
|
| Modifier and Type | Method and Description |
|---|---|
Optional<HttpStatus> |
getStatus()
Get HTTP response status associated with this exception as
HttpStatus, if available and known. |
int |
getStatusCode()
Get the HTTP status code.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic HttpStatusCodeException(int statusCode)
statusCode - HTTP status codepublic HttpStatusCodeException(int statusCode,
String message)
statusCode - HTTP status codemessage - Error messagepublic HttpStatusCodeException(int statusCode,
Throwable cause)
statusCode - HTTP status codecause - Nested exceptionpublic int getStatusCode()
public Optional<HttpStatus> getStatus()
HttpStatus, if available and known.Copyright © 2019 The Holon Platform. All rights reserved.