Package org.htmlunit
Class FailingHttpStatusCodeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.htmlunit.FailingHttpStatusCodeException
- All Implemented Interfaces:
Serializable
An exception that is thrown when the server returns a failing status code.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFailingHttpStatusCodeException
(String message, WebResponse failingResponse) Creates an instance.FailingHttpStatusCodeException
(WebResponse failingResponse) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
buildMessage
(WebResponse failingResponse) Gets the failing response.int
Returns the failing status code.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
-
Field Details
-
response_
-
-
Constructor Details
-
FailingHttpStatusCodeException
Creates an instance.- Parameters:
failingResponse
- the failing response
-
FailingHttpStatusCodeException
Creates an instance.- Parameters:
message
- the messagefailingResponse
- the failing response
-
-
Method Details
-
getStatusCode
public int getStatusCode()Returns the failing status code.- Returns:
- the code
-
getStatusMessage
Returns the message associated with the failing status code.- Returns:
- the message
-
buildMessage
-
getResponse
Gets the failing response.- Returns:
- the response
-