|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException com.google.gwt.user.client.rpc.InvocationException com.google.gwt.user.client.rpc.StatusCodeException
public class StatusCodeException
Indicates that an RPC response was returned with an invalid HTTP status code.
This exception will be presented via
AsyncCallback.onFailure(Throwable)
if the HTTP response from the
server does not have a 200
status code.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 reportMethod Detail |
---|
public 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()
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |