public class HttpException
extends java.lang.RuntimeException
This exception may be thrown during request processing if a specific HTTP error response needs to be produced. Only effective if thrown before the status code is sent.
| Constructor and Description |
|---|
HttpException(java.lang.String message)
Creates
HttpException associated with Http.Status#INTERNAL_SERVER_ERROR_500. |
HttpException(java.lang.String message,
Http.ResponseStatus status)
Creates
HttpException. |
HttpException(java.lang.String message,
Http.ResponseStatus status,
java.lang.Throwable cause)
Creates
HttpException. |
HttpException(java.lang.String message,
java.lang.Throwable cause)
Creates
HttpException associated with Http.Status#INTERNAL_SERVER_ERROR_500. |
| Modifier and Type | Method and Description |
|---|---|
Http.ResponseStatus |
status()
Obtain the associated http status.
|
public HttpException(java.lang.String message)
HttpException associated with Http.Status#INTERNAL_SERVER_ERROR_500.message - the messagepublic HttpException(java.lang.String message,
java.lang.Throwable cause)
HttpException associated with Http.Status#INTERNAL_SERVER_ERROR_500.message - the messagecause - the cause of this exceptionpublic HttpException(java.lang.String message,
Http.ResponseStatus status)
HttpException.message - the messagestatus - the http statuspublic HttpException(java.lang.String message,
Http.ResponseStatus status,
java.lang.Throwable cause)
HttpException.message - the messagestatus - the http statuscause - the cause of this exceptionpublic final Http.ResponseStatus status()
Copyright © 2018–2019 Oracle Corporation. All rights reserved.