throws
declarations to indicate which
exceptions may be thrown back to the client from a service
implementation. Callers should implement
AsyncCallback.onFailure(Throwable) to check for any exceptions
specified in the service interface.
InvocationException
because the
problem was with the invocation attempt itself rather than with the
service implementation itself.
An RPC can also fail with an invocation exception if the call does reach
the server, but an undeclared exception occurs during normal processing
of the call. There are many reasons such a situation could arise: a
necessary server resource, such as a database, might be unavailable, a
NullPointerException
could be thrown due to a bug in the
service implementation, and so on. In these cases, a
InvocationException is thrown in
application code.
Another type of failure can be caused by an incompatibility between the client and the server. This most commonly occurs when a change to a service implementation is deployed to a server but out-of-date clients are still active. For more details please see IncompatibleRemoteServiceException.
When the client code receives an IncompatibleRemoteServiceException, it should ultimately attempt to refresh the browser in order to pick up the latest client.