Package org.htmlunit

Class FailingHttpStatusCodeException

  • All Implemented Interfaces:
    java.io.Serializable

    public class FailingHttpStatusCodeException
    extends java.lang.RuntimeException
    An exception that is thrown when the server returns a failing status code.
    See Also:
    Serialized Form
    • Constructor Detail

      • FailingHttpStatusCodeException

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

        public FailingHttpStatusCodeException​(java.lang.String message,
                                              WebResponse failingResponse)
        Creates an instance.
        Parameters:
        message - the message
        failingResponse - the failing response
    • Method Detail

      • getStatusCode

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

        public java.lang.String getStatusMessage()
        Returns the message associated with the failing status code.
        Returns:
        the message
      • buildMessage

        private static java.lang.String buildMessage​(WebResponse failingResponse)
      • getResponse

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