java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.jooby.exception.StatusCodeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadRequestException
,ForbiddenException
,MethodNotAllowedException
,NotAcceptableException
,NotFoundException
,RegistryException
,UnauthorizedException
,UnsupportedMediaType
Runtime exception with status code.
- Since:
- 2.0.0
- Author:
- edgar
- See Also:
-
Constructor Summary
ConstructorDescriptionStatusCodeException
(StatusCode statusCode) Creates an error with the given status code.StatusCodeException
(StatusCode statusCode, String message) Creates an error with the given status code.StatusCodeException
(StatusCode statusCode, String message, Throwable cause) Creates an error with the given status code. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StatusCodeException
Creates an error with the given status code.- Parameters:
statusCode
- Status code.
-
StatusCodeException
Creates an error with the given status code.- Parameters:
statusCode
- Status code.message
- Error message.
-
StatusCodeException
public StatusCodeException(@NonNull StatusCode statusCode, @NonNull String message, @Nullable Throwable cause) Creates an error with the given status code.- Parameters:
statusCode
- Status code.message
- Error message.cause
- Cause.
-
-
Method Details
-
getStatusCode
Status code.- Returns:
- Status code.
-