Window.alert("A customer was returned? What the what?!");
}
}, new RestErrorCallback() {
@Override
public boolean error(Request message, Throwable throwable) {
CustomerNotFoundException cnfe = (CustomerNotFoundException) throwable;
Window.alert("As expected, an error of type '"
+ cnfe.getClass().getName() + "' was received for ID '"
+ cnfe.getCustomerId() + "'.");
return true;
}
}).retrieveCustomerById(17);
}
});