views:

192

answers:

1

We're trying to throw our own custom exception on the server side and handle it on the client to show specific error messages.

Currently all we get is InvocationException & StatusCodeException on the client. Is there a better way to get our own custom exceptions propagated to the client side.

Also, we do not want to declare "throws" declaration in our service interfaces.

Thanks.

+2  A: 

Keep in mind that your Exception classes need to be part of the GWT JRE emulation. If you define your own exception classes, make sure it's defined under the client package and implements IsSerializable.

Not sure if throwing run time exceptions and not declaring 'throws' on the service will play well with the serializer. You will have to try this out.

Ashwin Prabhu