* @param cb The callback object
* @param error The error object
*/
public static <T extends JavaScriptObject> void handleFailureCallback(
Callback<T> cb, com.google.gwt.gdata.client.Error error) {
UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
if (handler != null) {
try {
CallErrorException exc = new CallErrorException(error);
cb.onFailure(exc);
} catch (Throwable e) {
e.printStackTrace();
handler.onUncaughtException(e);
}
} else {
cb.onFailure(new CallErrorException(error));
}
}