Module io.jooby

Class StatusCodeException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadRequestException, ForbiddenException, MethodNotAllowedException, NotAcceptableException, NotFoundException, RegistryException, UnauthorizedException, UnsupportedMediaType

public class StatusCodeException extends RuntimeException
Runtime exception with status code.
Since:
2.0.0
Author:
edgar
See Also:
  • Constructor Details

    • StatusCodeException

      public StatusCodeException(@NonNull StatusCode statusCode)
      Creates an error with the given status code.
      Parameters:
      statusCode - Status code.
    • StatusCodeException

      public StatusCodeException(@NonNull StatusCode statusCode, @NonNull String message)
      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

      @NonNull public StatusCode getStatusCode()
      Status code.
      Returns:
      Status code.