public class StatusCodeException extends InvocationException
AsyncCallback.onFailure(Throwable) if the HTTP response from the
server does not have a 200 status code.| Constructor and Description |
|---|
StatusCodeException(int statusCode,
java.lang.String encodedResponse)
Construct an exception with the given status code and description.
|
StatusCodeException(int statusCode,
java.lang.String statusText,
java.lang.String encodedResponse)
Construct an exception with the given status code, status text and description.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getEncodedResponse()
Returns the response message associated with the failed request.
|
int |
getStatusCode()
Returns the status code associated with the failed request.
|
java.lang.String |
getStatusText()
Returns the status text associated with the failed request.
|
public StatusCodeException(int statusCode,
java.lang.String encodedResponse)
statusCode - the HTTP status code to reportencodedResponse - the HTTP response message to reportpublic StatusCodeException(int statusCode,
java.lang.String statusText,
java.lang.String encodedResponse)
statusCode - the HTTP status code to reportstatusText - the HTTP status text to reportencodedResponse - the HTTP response message to reportpublic java.lang.String getEncodedResponse()
public int getStatusCode()
The value will be 0 if the request failed (e.g. network error, or the server disallowed the request) or has been aborted (this will generally be the case when leaving the page).
public java.lang.String getStatusText()