类com.google.gwt.core.client.GWT.UncaughtExceptionHandler源码实例Demo

下面列出了怎么用com.google.gwt.core.client.GWT.UncaughtExceptionHandler的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: flow   文件: Console.java
private static void doReportStacktrace(Exception exception) {
    // Defer without $entry to bypass some of GWT's exception handling
    deferWithoutEntry(() -> {
        // Bypass regular exception reporting
        UncaughtExceptionHandler originalHandler = GWT
                .getUncaughtExceptionHandler();
        GWT.setUncaughtExceptionHandler(
                ignore -> GWT.setUncaughtExceptionHandler(originalHandler));

        // Throw in the appropriate way
        if (exception instanceof JavaScriptException) {
            // Throw originally thrown instance through JS
            jsThrow(((JavaScriptException) exception).getThrown());
        } else {
            throw exception;
        }
    });
}
 
源代码2 项目: unitime   文件: Client.java
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 项目: SensorWebClient   文件: Application.java
@Override
public void onModuleLoad() {
    GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
        public void onUncaughtException(Throwable e) {
            GWT.log("Uncaught Exception", e);
        }
    });
    
    // TODO refactor startup to be more explicit
    getPropertiesManager(); // creates singleton
}
 
源代码4 项目: document-management-software   文件: Login.java
@Override
public void onModuleLoad() {
	if (RootPanel.get("loadingwrapper-login") == null)
		return;

	GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
		@Override
		public void onUncaughtException(Throwable caught) {
			SC.warn("Error", caught.getMessage());
		}

	});

	instance = this;

	declareShowLostDialog(this);

	// Tries to capture locale parameter
	final String lang = Util.detectLocale();
	I18N.setLocale(lang);

	// Tries to capture tenant parameter
	final String tenant = Util.detectTenant();

	// Get grid of scrollbars, and clear out the window's built-in margin,
	// because we want to take advantage of the entire client area.
	Window.enableScrolling(false);
	Window.setMargin("0px");

	InfoService.Instance.get().getInfo(I18N.getLocale(), tenant, true, new AsyncCallback<GUIInfo>() {
		@Override
		public void onFailure(Throwable error) {
			SC.warn(error.getMessage());
		}

		@Override
		public void onSuccess(final GUIInfo info) {
			CookiesManager.saveRelease(info);

			I18N.init(info);

			WindowUtils.setTitle(info, null);

			Feature.init(info);
			Session.get().setInfo(info);

			WindowUtils.setFavicon(info);

			if ("mobile".equals(Util.getJavascriptVariable("j_layout")))
				loginPanel = new MobileLoginPanel(info);
			else
				loginPanel = new LoginPanel(info);

			Login.this.showLogin();
		}

	});
}
 
源代码5 项目: swellrt   文件: StageZero.java
/** @return the uncaught exception handler to install. */
protected UncaughtExceptionHandler createUncaughtExceptionHandler() {
  // Use GWT's one by default.
  return GWT.getUncaughtExceptionHandler();
}
 
源代码6 项目: swellrt   文件: WebClient.java
private ErrorHandler(UncaughtExceptionHandler next) {
  this.next = next;
}
 
源代码7 项目: swellrt   文件: StageZero.java
/** @return the uncaught exception handler to install. */
protected UncaughtExceptionHandler createUncaughtExceptionHandler() {
  // Use GWT's one by default.
  return GWT.getUncaughtExceptionHandler();
}
 
源代码8 项目: incubator-retired-wave   文件: WebClient.java
private ErrorHandler(UncaughtExceptionHandler next) {
  this.next = next;
}
 
源代码9 项目: incubator-retired-wave   文件: StageZero.java
/** @return the uncaught exception handler to install. */
protected UncaughtExceptionHandler createUncaughtExceptionHandler() {
  // Use GWT's one by default.
  return GWT.getUncaughtExceptionHandler();
}