Class RESTException

All Implemented Interfaces:
Serializable

@API public class RESTException extends RuntimeException
See Also:
  • Constructor Details

    • RESTException

      public RESTException(String msg)
      Constructs an instance of RESTException with the specified plain text message.
      Parameters:
      msg - a plain text message
    • RESTException

      public RESTException(String msg, Throwable cause)
      Constructs an instance of RESTException with the specified plain text message.
      Parameters:
      msg - a plain text message
      cause - an exception indicating the cause of error
    • RESTException

      public RESTException(Throwable cause)
      Constructs an instance of RESTException with the specified cause.
      Parameters:
      cause - an exception indicating the cause of error
    • RESTException

      public RESTException(int status, String message, String contentType)
      Constructs an instance of RESTException with the specified status code, message and content type.
      Parameters:
      status - an HTTP status code
      message - an error message
      contentType - a content type.
  • Method Details

    • getStatus

      public Integer getStatus()
      Returns the HTTP status code.
      Returns:
      a HTTP status code
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getContentType

      public String getContentType()
      Returns the content type.
      Returns:
      a content type