Class HttpException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HttpInternalErrorException, HttpNotFoundException

public class HttpException extends RuntimeException
This exception is thrown when an Http error (response code 4xx or 5xx) is detected.
Author:
Seth Ladd, Russell Gold
See Also:
  • Constructor Details

    • HttpException

      protected HttpException(int responseCode)
      throw a http Exception with the given responseCode
      Parameters:
      responseCode -
    • HttpException

      protected HttpException(int responseCode, Throwable cause)
      throw a http Exception with the given responseCode and cause
      Parameters:
      responseCode -
      cause -
    • HttpException

      protected HttpException(int responseCode, String responseMessage, URL baseURL)
      throw a http Exception with the given responseCode and Message and base url
      Parameters:
      responseCode -
      responseMessage -
      baseURL -
    • HttpException

      protected HttpException(int responseCode, String responseMessage, URL baseURL, Throwable cause)
      throw a http Exception with the given responseCode and Message, base url and cause
      Parameters:
      responseCode -
      responseMessage -
      baseURL -
      cause -
  • Method Details

    • getMessage

      public String getMessage()
      get the Message for the http Exception
      Overrides:
      getMessage in class Throwable
      Returns:
      - the message of the Exception
    • getResponseCode

      public int getResponseCode()
      get the response Code of this http Exception
      Returns:
      - the response Code code 4xx or 5xx
    • getResponseMessage

      public String getResponseMessage()
      get the response Message of this http Exception
      Returns:
      the response message
    • getCause

      public Throwable getCause()
      get the cause (if any)
      Overrides:
      getCause in class Throwable