Package org.htmlunit

# Class FailingHttpStatusCodeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.htmlunit.FailingHttpStatusCodeException

All Implemented Interfaces:
  `Serializable`

public class FailingHttpStatusCodeException extends RuntimeException
An exception that is thrown when the server returns a failing status code.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FailingHttpStatusCodeException(String message, WebResponse failingResponse)`
  Creates an instance.
  `FailingHttpStatusCodeException(WebResponse failingResponse)`
  Creates an instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `WebResponse`
  `getResponse()`
  Gets the failing response.
  `int`
  `getStatusCode()`
  Returns the failing status code.
  `String`
  `getStatusMessage()`
  Returns the message associated with the failing status code.

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### FailingHttpStatusCodeException

    public FailingHttpStatusCodeException(WebResponse failingResponse)
    Creates an instance.
    Parameters:
      `failingResponse` - the failing response

  - ### FailingHttpStatusCodeException

    public FailingHttpStatusCodeException(String message, WebResponse failingResponse)
    Creates an instance.
    Parameters:
      `message` - the message
      `failingResponse` - the failing response

- ## Method Details

  - ### getStatusCode

    public int getStatusCode()
    Returns the failing status code.
    Returns:
      the code

  - ### getStatusMessage

    public String getStatusMessage()
    Returns the message associated with the failing status code.
    Returns:
      the message

  - ### getResponse

    public WebResponse getResponse()
    Gets the failing response.
    Returns:
      the response