Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.vertx.ext.web.handler.HttpException
- All Implemented Interfaces:
Serializable
An utility exception class to signal HTTP failures.
The class with convey an http status code, by default is is
500. The exception may contain a cause throwable
and for special cases a simple payload string may be added for context. The payload can be used for example perform
a redirect.
The message for the exception is inferred from the standard http error code using HttpResponseStatus.- Author:
- Paulo Lopes
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpException(int statusCode) HttpException(int statusCode, String payload) HttpException(int statusCode, String payload, Throwable cause) HttpException(int statusCode, Throwable cause) -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpException
public HttpException() -
HttpException
public HttpException(int statusCode) -
HttpException
-
HttpException
-
HttpException
-
-
Method Details
-
getStatusCode
public int getStatusCode() -
getPayload
-