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

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


      return onFormSubmitImpl();
    }
  }

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


   * handler.  Otherwise, run the Runnable and do not catch exceptions.
   *
   * @param runnable The Runnable to execute.
   */
  public static void runProtected(Runnable runnable) {
    UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
    if (handler != null) {
      try {
        runnable.run();
      } catch (Throwable e) {
        handler.onUncaughtException(e);
      }
    } else {
      runnable.run();
    }
  }
View Full Code Here

      if (LogLevel.showDebug()) {
        editMain.add(error);
        editMain.add(fatal);
        editMain.add(log);
        // We need our own uncaught exception hander to make sure the error shout happens
        GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
          public void onUncaughtException(Throwable e) {
            logUncaughtExceptions(e);
          }
        });
      } else {
        HTML spacer = new HTML();
        editMain.add(spacer);
      }

      initWidget(editMain);

      // Enable logging (important to do this after main is attached
      // such that exceptions occurring before this can be handled by
      // GWT's Default handler...)
      if (LogLevel.showDebug()) {
        DomLogger.enable(log.getElement());
        lottaLogging();
      }

      KeyBindingRegistry keysRegistry = new KeyBindingRegistry();
      extendKeyBindings(keysRegistry);

      // Start editing
      editor1.init(testEditorRegistries, keysRegistry, EditorSettings.DEFAULT);
      editor2.init(testEditorRegistries, keysRegistry, EditorSettings.DEFAULT);
      editor1.addUpdateListener(new EditorUpdateListener() {
        @Override
        public void onUpdate(EditorUpdateEvent event) {
          outputBothEditorStates();
        }

      });

      editor1.setOutputSink(editor1Sink);
      editor2.setOutputSink(editor2Sink);
      clearEditors();
      editor1.setEditing(true);
      editor2.setEditing(false);
      toggleEditCheck2.setValue(false);
      toggleEditCheck1.setValue(true);

      // Output initial state
      outputBothEditorStates();
      outputOperation(null);

    } catch (RuntimeException r) {
      // Do we need this at all?

      UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
      if (handler != null) {
        handler.onUncaughtException(r);
      } else {
        logger.error().log(r);
      }
      throw r;
    }
View Full Code Here

        config = GWT.create(CruxClientConfig.class);
        errorHandler = GWT.create(ErrorHandler.class);
        validationErrorHandler = GWT.create(ValidationErrorHandler.class);
       
        // define a default handler for uncaught exception
        GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler()
        {
          @Override
          public void onUncaughtException(Throwable e)
          {
            errorHandler.handleError(e);
View Full Code Here

   * @param elem the handle to the element that received the event.
   * @param listener the listener associated with the element that received the
   *          event.
   */
  static void dispatchEvent(Event evt, Element elem, EventListener listener) {
    UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
    if (handler != null) {
      dispatchEventAndCatch(evt, elem, listener, handler);
    } else {
      dispatchEventImpl(evt, elem, listener);
    }
View Full Code Here

  public static native void setTitle(String title) /*-{
    $doc.title = title;
  }-*/;

  static void onClosed() {
    UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
    if (handler != null) {
      fireClosedAndCatch(handler);
    } else {
      fireClosedImpl();
    }
View Full Code Here

      fireClosedImpl();
    }
  }

  static String onClosing() {
    UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
    if (handler != null) {
      return fireClosingAndCatch(handler);
    } else {
      return fireClosingImpl();
    }
View Full Code Here

      return fireClosingImpl();
    }
  }

  static void onResize() {
    UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
    if (handler != null) {
      fireResizedAndCatch(handler);
    } else {
      fireResizedImpl();
    }
View Full Code Here

 
  private MainPanel mainPanel;

  public void onModuleLoad() {
    // Trap unhandled errors
    GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {

      @Override
      public void onUncaughtException(Throwable unhandled) {
        Throwable unwrapped = unwrap(unhandled);
        unwrapped.printStackTrace();
View Full Code Here

  private Dispatcher dispatcher;
  private ExplorerModel model;

  public void onModuleLoad() {
    if (!GWT.isScript()) {
      GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
        public void onUncaughtException(Throwable e) {
          e.printStackTrace();
        }
      });
    }
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.