Class HttpErrorException

java.lang.Object
java.lang.Throwable
java.lang.Exception
de.uplanet.net.http.HttpErrorException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HttpClientErrorException, HttpServerErrorException

public class HttpErrorException extends Exception
See Also:
  • Constructor Details

    • HttpErrorException

      public HttpErrorException(int p_iStatus)
      Create a HTTP exception with the given status code.
      Parameters:
      p_iStatus - The status code.
    • HttpErrorException

      public HttpErrorException(int p_iStatus, String p_strMessage)
      Create a HTTP exception with the given status code.
      Parameters:
      p_iStatus - The status code.
      p_strMessage - An error message that can be later retrieved by the Throwable.getMessage() method.
    • HttpErrorException

      public HttpErrorException(int p_iStatus, Throwable p_cause)
      Create a HTTP exception with the given status code.
      Parameters:
      p_iStatus - The status code.
      p_cause - The cause that can be later retrieved by the Throwable.getCause() method. A null value is permitted, and indicates that the cause is nonexistent or unknown.
    • HttpErrorException

      public HttpErrorException(int p_iStatus, String p_strMessage, Throwable p_cause)
      Create a HTTP exception with the given status code.
      Parameters:
      p_iStatus - The status code.
      p_strMessage - An error message that can be later retrieved by the Throwable.getMessage() method.
      p_cause - The cause that can be later retrieved by the Throwable.getCause() method. A null value is permitted, and indicates that the cause is nonexistent or unknown.
  • Method Details

    • getStatus

      public int getStatus()
      Get the HTTP status associated with this error.
      Returns:
      The HTTP status.
    • getStatusMessage

      public String getStatusMessage()
      Get the HTTP status message associated with this error.

      If no message was provided with the constructor, the standard status message will be returned.

      Returns:
      The status message.