本文整理匯總了Java中com.google.gwt.core.client.GWT.setUncaughtExceptionHandler方法的典型用法代碼示例。如果您正苦於以下問題:Java GWT.setUncaughtExceptionHandler方法的具體用法?Java GWT.setUncaughtExceptionHandler怎麽用?Java GWT.setUncaughtExceptionHandler使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.core.client.GWT
的用法示例。
在下文中一共展示了GWT.setUncaughtExceptionHandler方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import com.google.gwt.core.client.GWT; //導入方法依賴的package包/類
public static void init() {
GWT.setUncaughtExceptionHandler(throwable -> LOGGER.error("Uncaught Exception", throwable));
ClientRouter clientRouter = new ClientRouter(new ClientEventFactory());
ServerRouter serverRouter = new ServerRouter(new GwtRequestAsyncSender(new ServerEventFactory()));
RequestEventProcessor requestEventProcessor = new RequestEventProcessor();
SimpleEventsBus eventBus = new SimpleEventsBus(requestEventProcessor);
ClientApp.ClientAppBuilder
.clientRouter(clientRouter)
.serverRouter(serverRouter)
.eventsBus(eventBus)
.requestRepository(new InMemoryCommandsRepository())
.presentersRepository(new InMemoryPresentersRepository())
.viewsRepository(new InMemoryViewRepository())
.contributionsRepository(new InMemoryContributionRepository())
.requestSendersRepository(new InMemoryRequestRestSendersRepository())
.history(new StateHistory())
.asyncRunner(new GwtAsyncRunner())
.mainExtensionPoint(new CoreMainExtensionPoint())
.dominoOptions(new RestyGwtOptions())
.build();
}
示例2: onModuleLoad
import com.google.gwt.core.client.GWT; //導入方法依賴的package包/類
public void onModuleLoad() {
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void onUncaughtException(Throwable e) {
Throwable u = ToolBox.unwrap(e);
sLogger.log(Level.WARNING, MESSAGES.failedUncaughtException(u.getMessage()), u);
}
});
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
onModuleLoadDeferred();
}
});
}
示例3: start
import com.google.gwt.core.client.GWT; //導入方法依賴的package包/類
public void start() {
GWT.setUncaughtExceptionHandler(exceptionHandler);
RxJavaHooks.setOnError(e -> GWT.getUncaughtExceptionHandler().onUncaughtException(e));
}