public final class HttpException extends RuntimeException
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.| Constructor and Description |
|---|
HttpException() |
HttpException(int statusCode) |
HttpException(int statusCode,
String payload) |
HttpException(int statusCode,
String payload,
Throwable cause) |
HttpException(int statusCode,
Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
String |
getPayload() |
int |
getStatusCode() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic HttpException()
public HttpException(int statusCode)
public HttpException(int statusCode,
Throwable cause)
public HttpException(int statusCode,
String payload)
public int getStatusCode()
public String getPayload()
Copyright © 2021 Eclipse. All rights reserved.