Search code examples
javagwtrestlet

Handling custom server-side exceptions from server to GWT Client


In what way (and Restlet version) can a GWT application handle custom server-side exceptions and handle it from GWT client-side using the ClientProxy interface such that the app can check if:

if(exception instanceof CustomServerException){
 // Do UI stuff
} 

Solution

  • Restlet 2.3 introduces annotated exceptions that allow to hide the use of the class ResourceException and leverage transparently user-defined exceptions on the client side with client proxy.

    For more details, you can have à look at this link: https://templth.wordpress.com/2015/02/27/exception-handling-with-restlet/

    Hope it helps you, Thierry