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.

1
  • 1
    Any particular reason you don't want to declare the exceptions that you will throw? That's typically what one does in Java. Commented Jul 26, 2010 at 21:47

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

I created a custom Restlet ClientProxyGenerator that supports exceptions towards GWT clients;

Receive custom exceptions from Restlet Framework in GWT client

The current version only supports one exception per interface, i'll expand this in the near future (i need this myself).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.