What is the requirement in a Service implementation so that the ErrorCallback
will be able to print the error message on the UI like.
I tried injecting a ErrorCallback
in the Service call code, and when I print the Message
object its null.
What should be the Service implementation look like, should I put throws SomeException
on the implementation method? Or?
myService.call(new RemoteCallback<String>() {
@Override
public void callback(String response) {
Multimap<String, String> state = ArrayListMultimap.create();
state.put("hash", response);
submit.go(state);
}
}, new ErrorCallback() {
@Override
public boolean error(Message message, Throwable throwable) {
throwable.printStackTrace();
Window.alert("Error: " + message);
return false;
}
}).createmy(my);