Package com.google.gwt.core.client.GWT

Examples of com.google.gwt.core.client.GWT.UncaughtExceptionHandler


      ErrorEvent event) {
    if (handler == null) {
      return false;
    }

    UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
    if (ueh != null) {
      try {
        return handler.onError(event);
      } catch (Throwable e) {
        ueh.onUncaughtException(e);
        return false;
      }
    } else {
      return handler.onError(event);
    }
View Full Code Here


      MessageEvent event) {
    if (handler == null) {
      return;
    }

    UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
    if (ueh != null) {
      try {
        handler.onMessageReceived(event);
      } catch (Throwable e) {
        ueh.onUncaughtException(e);
      }
    } else {
      handler.onMessageReceived(event);
    }
  }
View Full Code Here

        impl.submit(getAction(), synthesizedFrame);
        super.submitForm();
    }

    public void onFrameLoad() {
        UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
        if (handler != null) {
            onFrameLoadAndCatch(handler);
        } else {
            onFrameLoadImpl();
        }
View Full Code Here

        /*
         * Display some sort of error of exceptions in web mode to debug
         * console. After this, exceptions are reported to VConsole and possible
         * GWT hosted mode.
         */
        GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
            public void onUncaughtException(Throwable e) {
                /*
                 * Note in case of null console (without ?debug) we eat
                 * exceptions. "a1 is not an object" style errors helps nobody,
                 * especially end user. It does not work tells just as much.
View Full Code Here

  }

  private void loadApplication() {  

    GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {

      public void onUncaughtException(Throwable e) {
        LOG.log(Level.SEVERE, "Uncaught error", e);
      }
    });
View Full Code Here

  /**
   * better exception handling
   */
    private void setUncaughtExceptionHandler() {
        GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
            public void onUncaughtException(Throwable e) {
                if (e.getCause() != null && e.getCause() instanceof StatusCodeException) {
                    GWT.log("Exception (server-side) :(", e);
                    Window.alert("Exception (server-side)");
                } else {
View Full Code Here

   *
   * @param parentView
   *          where to show the app's widget
   */
  public void run(LayoutPanel parentView) {
    GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
      @Override
      public void onUncaughtException(Throwable e) {
        while (e instanceof UmbrellaException) {
          e = ((UmbrellaException) e).getCauses().iterator().next();
        }
View Full Code Here

  /**
   * This is the entry point method.
   */
  @Override
  public void onModuleLoad() {
    GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
      @Override
      public void onUncaughtException(Throwable e) {
        log.log(Level.SEVERE, e.getMessage(), e);
      }
    });
View Full Code Here

   * @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));
    }
  }
View Full Code Here

   * @param cb The callback object
   * @param arg The callback's return value
   */
  public static <T extends JavaScriptObject> void handleSuccessCallback(
      Callback<T> cb, T arg) {
    UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
    if (handler != null) {
      try {
        cb.onSuccess(arg);
      } catch (Throwable e) {
        e.printStackTrace();
        handler.onUncaughtException(e);
      }
    } else {
      cb.onSuccess(arg);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.core.client.GWT.UncaughtExceptionHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.