Package com.linecorp.armeria.server
Class HttpStatusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.linecorp.armeria.server.HttpStatusException
- All Implemented Interfaces:
Serializable
public final class HttpStatusException extends RuntimeException
A
RuntimeException
that is raised to send a simplistic HTTP response with minimal content
by a Service
. It is a general exception raised by a failed request or a reset stream.- See Also:
HttpResponseException
, Serialized Form
-
Method Summary
Modifier and Type Method Description HttpStatus
httpStatus()
Returns theHttpStatus
which would be sent back to the client who sent the corresponding request.static HttpStatusException
of(int statusCode)
Returns a newHttpStatusException
instance with the specified HTTP status code.static HttpStatusException
of(int statusCode, Throwable cause)
Returns a newHttpStatusException
instance with the specified HTTP status code andcause
.static HttpStatusException
of(HttpStatus status)
Returns a newHttpStatusException
instance with the specifiedHttpStatus
.static HttpStatusException
of(HttpStatus status, Throwable cause)
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
of
Returns a newHttpStatusException
instance with the specified HTTP status code. -
of
Returns a newHttpStatusException
instance with the specified HTTP status code andcause
. -
of
Returns a newHttpStatusException
instance with the specifiedHttpStatus
. -
of
-
httpStatus
Returns theHttpStatus
which would be sent back to the client who sent the corresponding request.
-