Class JKHttpException

All Implemented Interfaces:
Serializable

public class JKHttpException extends JKException
This class represents exception thrown to indicate an data HTTP-related errors within the application

This exception is a subclass of JKException.

This class should be used to represent situations where an HTTP request or response encounters an error condition.

Version:
1.0
Author:
Dr. Jalal H. Kiswani
See Also:
  • Constructor Details

    • JKHttpException

      public JKHttpException()
      This method constructs a new JKHttpException without any specified errors or causes.

      This constructor is typically used when the exception is thrown to represent a specific error condition without additional details.

    • JKHttpException

      public JKHttpException(String message, int errorCode)
      This method constructs a JKHttpException with a specific error message and code.
      Parameters:
      message - Specifies the error message explaining the HTTP error.
      errorCode - Specifies the error code of this exception.
    • JKHttpException

      public JKHttpException(String message, Throwable cause)
      This method constructs a JKHttpException with a specific error message and a cause.
      Parameters:
      message - Specifies the error message explaining the HTTP error.
      cause - Specifies the cause of this exception.
    • JKHttpException

      public JKHttpException(Throwable cause)
      This method constructs a JKHttpException with a cause.
      Parameters:
      cause - Specifies the cause of this exception.
  • Method Details

    • getErrorCode

      public int getErrorCode()
      This method gets the error code of this exception.
      Returns:
      the error code of this exception.
    • setErrorCode

      public void setErrorCode(int errorCode)
      This methods replaces the current the error code of this exception.
      Parameters:
      errorCode - Specifies the new error code.