public class HttpException extends 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(String message)
Creates
HttpException associated with Http.Status#INTERNAL_SERVER_ERROR_500. |
HttpException(String message,
Http.ResponseStatus status)
Creates
HttpException. |
HttpException(String message,
Http.ResponseStatus status,
Throwable cause)
Creates
HttpException. |
HttpException(String message,
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.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic HttpException(String message)
HttpException associated with Http.Status#INTERNAL_SERVER_ERROR_500.message - the messagepublic HttpException(String message, Throwable cause)
HttpException associated with Http.Status#INTERNAL_SERVER_ERROR_500.message - the messagecause - the cause of this exceptionpublic HttpException(String message, Http.ResponseStatus status)
HttpException.message - the messagestatus - the http statuspublic HttpException(String message, Http.ResponseStatus status, Throwable cause)
HttpException.message - the messagestatus - the http statuscause - the cause of this exceptionpublic final Http.ResponseStatus status()
Copyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.