本文整理汇总了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));
}