Class HttpException

All Implemented Interfaces:
Serializable

public class HttpException extends AbstractRuntimeException
Thrown when there was an HTTP or communications error between the client and server. See the exception message for more specific information (if available).
Since:
1.1
See Also:
  • Constructor Details

    • HttpException

      public HttpException(String message)
      Constructs an HttpException with the specified message.
      Parameters:
      message - the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage() method).
    • HttpException

      public HttpException(int statusCode, String message)
      Constructs an HttpException with the specified HTTP status code and message.
      Parameters:
      statusCode - the HTTP status code
      message - the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage() method).
    • HttpException

      public HttpException(int statusCode, String message, Throwable cause)
      Constructs an HttpException with the specified HTTP status code, message and cause.
      Parameters:
      statusCode - the HTTP status code
      message - the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage() method).
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    • HttpException

      public HttpException(String message, Throwable cause)
      Constructs an HttpException with the specified message and cause.
      Parameters:
      message - the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage() method).
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
  • Method Details

    • getStatusCode

      public int getStatusCode()
      Return the HTTP status code associated with this exception, if one exists.
      Returns:
      the HTTP status code associated with this exception, if one exists.