java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.helidon.webserver.HttpException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadRequestException,NotFoundException
Runtime exception for applications.
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.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpException(String message) CreatesHttpExceptionassociated withHttp.Status.INTERNAL_SERVER_ERROR_500.HttpException(String message, Http.ResponseStatus status) CreatesHttpException.HttpException(String message, Http.ResponseStatus status, Throwable cause) CreatesHttpException.HttpException(String message, Throwable cause) CreatesHttpExceptionassociated withHttp.Status.INTERNAL_SERVER_ERROR_500. -
Method Summary
Modifier and TypeMethodDescriptionfinal Http.ResponseStatusstatus()Obtain the associated http status.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpException
CreatesHttpExceptionassociated withHttp.Status.INTERNAL_SERVER_ERROR_500.- Parameters:
message- the message
-
HttpException
CreatesHttpExceptionassociated withHttp.Status.INTERNAL_SERVER_ERROR_500.- Parameters:
message- the messagecause- the cause of this exception
-
HttpException
CreatesHttpException.- Parameters:
message- the messagestatus- the http status
-
HttpException
CreatesHttpException.- Parameters:
message- the messagestatus- the http statuscause- the cause of this exception
-
-
Method Details
-
status
Obtain the associated http status.- Returns:
- the http status
-