Package org.htmlunit
Class FailingHttpStatusCodeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.htmlunit.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
-
-
Field Summary
Fields Modifier and Type Field Description private WebResponse
response_
-
Constructor Summary
Constructors Constructor Description FailingHttpStatusCodeException(java.lang.String message, WebResponse failingResponse)
Creates an instance.FailingHttpStatusCodeException(WebResponse failingResponse)
Creates an instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
buildMessage(WebResponse failingResponse)
WebResponse
getResponse()
Gets the failing response.int
getStatusCode()
Returns the failing status code.java.lang.String
getStatusMessage()
Returns the message associated with the failing status code.
-
-
-
Field Detail
-
response_
private final WebResponse response_
-
-
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 messagefailingResponse
- 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
-
-