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

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


        /*
         * 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


    });
  }-*/;

  @SuppressWarnings("unused")
  private static void fireDumpCb(GetDumpCallback cb, String dumpData) {
    UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
    if (ueh == null) {
      cb.callback(dumpData);
    } else {
      try {
        cb.callback(dumpData);
      } catch (Throwable ex) {
        ueh.onUncaughtException(ex);
      }
    }
  }
View Full Code Here

    }
  }

  @SuppressWarnings("unused")
  private static void fireMonitoringCb(MonitoringCallback cb) {
    UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
    if (ueh == null) {
      cb.callback();
    } else {
      try {
        cb.callback();
      } catch (Throwable ex) {
        ueh.onUncaughtException(ex);
      }
    }
  }
View Full Code Here

  }

  @SuppressWarnings("unused")
  private static void onResponseCallback(Callback callback,
      QueryResponse response) {
    UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
    if (handler != null) {
      fireAndCatch(handler, callback, response);
    } else {
      fireImpl(callback, response);
    }
View Full Code Here

   * @param sendResponse the function object that can be used to send a response
   *          to the sender
   */
  private static void onRequestExternalImpl(Listener listener,
      JavaScriptObject request, Sender sender, SendResponse sendResponse) {
    UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
    if (ueh != null) {
      try {
        listener.onRequestExternal(request, sender, sendResponse);
      } catch (Exception ex) {
        ueh.onUncaughtException(ex);
      }
    } else {
      listener.onRequestExternal(request, sender, sendResponse);
    }
  }
View Full Code Here

    protected WrappedEventListener(EventListener delegate) {
      this.delegate = delegate;
    }
   
    public void handleEvent(Event event) {
      UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler();
      if (handler != null) {
        handleEventAndCatch(event, handler);
      } else {
        delegate.handleEvent(event);
      }
View Full Code Here

   *
   * @param listener the listener object to call back.
   * @param port argument from the callback.
   */
  private static void onConnectImpl(Listener listener, Port port) {
    UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
    if (ueh != null) {
      try {
        listener.onConnectExternal(port);
      } catch (Exception ex) {
        ueh.onUncaughtException(ex);
      }
    } else {
      listener.onConnectExternal(port);
    }
  }
View Full Code Here

   *
   * @param listener the listener object to call back.
   * @param port argument from the callback.
   */
  private static void onConnectImpl(Listener listener, Port port) {
    UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
    if (ueh != null) {
      try {
        listener.onConnect(port);
      } catch (Exception ex) {
        ueh.onUncaughtException(ex);
      }
    } else {
      listener.onConnect(port);
    }
  }
View Full Code Here

   * Initialize the event handlers for the host.
   */
  private void init() {
    breakyWorker.setOnError(new ErrorHandler() {
      public void onError(ErrorEvent event) {
        UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
        if (ueh != null) {
          try {
            onBreakyException(event);
          } catch (Exception ex) {
            ueh.onUncaughtException(ex);
          }
        } else {
          onBreakyException(event);
        }
      }
    });

    breakyWorker.setOnMessage(new MessageHandler() {
      public void onMessage(MessageEvent event) {
        UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
        if (ueh != null) {
          try {
            fireOnBreakyMessage(event);
          } catch (Exception ex) {
            ueh.onUncaughtException(ex);
          }
        } else {
          fireOnBreakyMessage(event);
        }
      }
View Full Code Here

   * @param sendResponse the function object that can be used to send a response
   *          to the sender
   */
  private static void onRequestImpl(Listener listener,
      JavaScriptObject request, Sender sender, SendResponse sendResponse) {
    UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
    if (ueh != null) {
      try {
        listener.onRequest(request, sender, sendResponse);
      } catch (Exception ex) {
        ueh.onUncaughtException(ex);
      }
    } else {
      listener.onRequest(request, sender, sendResponse);
    }
  }
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.