This is the method onFailure(Throwable t)on AsyncCallback. This method is called when the RPC fails for any reason, including (but not limited to) loss of connection.
Because Throwablewhich is passed in onFailure()can be anything, the template used in documents:
public void onFailure(Throwable caught) {
try {
throw caught;
} catch (IncompatibleRemoteServiceException e) {
} catch (InvocationException e) {
} catch (Throwable e) {
}
}
, InvocationException onFailure()