Receive custom exceptions from Restlet Framework in GWT client

前端 未结 2 1192
别那么骄傲
别那么骄傲 2020-12-20 04:39

I want to use Exception handling with the Restlet Framework and GWT clients. The Restlet Framework supports the concept of annotated exceptions as described in this post;

2条回答
  •  既然无缘
    2020-12-20 05:38

    With help of Jerome Louvel and Thierry Boileau i created a new ClientProxyGenerator() that supports custom exceptions towards a GWT client;

    Just specify the exception from the interface in the ServerResourceProxy (ClientProxy)

    and voilà

    It is possible to use this custom ClientProxyGenerator() in your project right away.

    Download custom ClientProxyGenerator

    And place it in a package on the server (for example package com.ludus.server.util)

    In GWT module XML change the ClientProxyGenerator to the new version on the server;

    And you're ready to go with your custom exceptions, but it would be nice if this extension would be integrated in the Restlet framework.

提交回复
热议问题