You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Hi guys,
I am stuck on the gwt rpc exception handling. I got a service method
that throws a checked exception. My AsyncCallback forces me to add two
methods: onFailure(Throwable caught) and onSuccess. If the checked
exception is thrown, the callback method onFailure is invoked.
-> So far everything is ok, but eclipse forces me to add a throw/catch
block around the ServiceCall and to catch the checked exception. Even
when the exception is thrown, this code is never called as the
exception goes directly into onFailure. How can I avoid adding the try/
catch block? It is somewhat useless to me...
Regards,
Alex
Thomas Broyer
unread,
Sep 9, 2011, 4:54:10 AM9/9/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
You should declare thrown exceptions only on the "sync" interface, not the "async" one.
Sync:
boolean doFoo(int bar) throws MyException;
Async:
void doFoo(int bar, AsyncCallback<Boolean> callback); // no "throws" clause here
Alex
unread,
Sep 9, 2011, 4:58:35 AM9/9/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Ahhhh alright! I knew there must have been some stupid mistake. Thank
you!
Alex
unread,
Sep 9, 2011, 5:02:08 AM9/9/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Someone should report this, the AsyncCallback in the demo application
has a throws declaration too: