In your service interface, declare that it throws one or more exceptions. This is what it 
means to be a "recognized" exception.  Also, make sure those exceptions are 
GWT-serializable. You might want to create your own top-level exception for this, and 
just declare that it throws that, but you don't have to do it this way.

Whenever your service implementation throws an exception that's declared in the 
service API, it will get passed back to the client's onFailure method.

Paul

On 12/04/11 16:29, Greg Dougherty wrote:
I'm trying to throw an exception from my servlet back to the client
without breaking anything along the way, and having no success.

First I was throwing an InvocationException, but this created an error
it was an unrecognized exception.

So I threw a ServletException.  This is acceptable on the Servlet
side, because doPost is specified to throw ServletException.  But on
the Client side it creates a problem, because ServletException is not
IsSerializable.  And I can't create a Shared Exception that
IsSerializable and inherits from ServletException, because
ServletException is not defined on the Client side.

So, how DOES my RPC code pass an exception back to the client without
generating any errors for the servlet code?

TIA,

Greg


--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to