public class ResponseException extends JauntException
Constructor and Description |
---|
ResponseException(String message,
HttpResponse response,
String requestUrlData)
Create a ResponseException from the specified text (error message) and Response object, which can be null (indicating an ability to make a connection).
|
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Returns the message associated with the Exception.
|
String |
getRequestUrlData()
Returns the url associated with this exception, of the form
"<url>" or "<url> [posting <data>]" |
HttpResponse |
getResponse()
Returns the Response associated with the Exception, which encapsulated meta-data (including HTTP status codes) for the HTTP response.
|
int |
getStatusCode()
Returns the status code of the response or -1 if the response is null (such as for a Connection error)
|
String |
toString()
Returns a String representation of the ResponseException.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public ResponseException(String message, HttpResponse response, String requestUrlData)
response
- a Response object, which encapsulated meta-data (including HTTP status codes) for the HTTP response.requestUrlData
- the url associated with this exception, of the form "<url>"
or "<url> [posting <data>]"
public HttpResponse getResponse()
public int getStatusCode()
public String getMessage()
getMessage
in class Throwable
public String getRequestUrlData()
"<url>"
or "<url> [posting <data>]"