service.getShapes(dbName, new AsyncCallback() {
public void onSuccess(Shape[] result) {
// It's always safe to downcast to the known return type.
controller.processShapes(result);
}
public void onFailure(Throwable caught) {
// Convenient way to find out which exception was thrown.
try {
throw caught;
} catch (IncompatibleRemoteServiceException e) {
// this client is not compatible with the server; cleanup and refresh the
// browser
} catch (InvocationException e) {
// the call didn't complete cleanly
} catch (ShapeException e) {
// one of the 'throws' from the original method
} catch (DbException e) {
// one of the 'throws' from the original method
} catch (Throwable e) {
// last resort -- a very unexpected exception
}
}
onfail
最新推荐文章于 2026-06-28 09:48:44 发布
521

被折叠的 条评论
为什么被折叠?



