I am creating a RPC call using Async method in GWT. I have to check if there is any error on my Server side. Can I catch the exceptions of the server side on the Client side in GWT RPC?
How to pass exception from Server to Client side in GWT RPC
1.3k views Asked by Trisha At
2
The exceptions have to be declared in a
throws
clause in yourRemoteService
interface's methods, and have to be serializable by GWT-RPC under the same conditions as any other transported class.You'll receive the exception in your
AsyncCallback
'sonFailure
. See also the javadoc forAsyncCallback
.EDIT: actually, it happens that I just said the same thing that the doc already says: http://www.gwtproject.org/doc/latest/DevGuideServerCommunication.html#DevGuideHandlingExceptions