@Override public final void onModuleLoad() { GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { @Override public void onUncaughtException(Throwable e) { // TODO Auto-generated method stub String msg = e.toString(); for (StackTraceElement elt : e.getStackTrace()) { msg += "\n in " + elt.getMethodName() + "("+elt.getFileName()+":"+elt.getLineNumber()+")"; } alert(msg); } }); // Need to do everything else in a deferred command, so that // The uncaut exception handler has taken effect // Scheduler.get().scheduleDeferred(new ScheduledCommand() { // @Override // public void execute() { start(); // } // }); }
@Override public final void onModuleLoad() { GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { @Override public void onUncaughtException(Throwable e) { ForPlay.log().error("Uncaught Exception: ", e); } }); // Need to do everything else in a deferred command, so that // the uncaught exception handler has taken effect Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { start(); } }); }
@Override public void onModuleLoad() { GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { @Override public void onUncaughtException(Throwable e) { Window.alert("uncaught: " + e.getMessage()); String s = buildStackTrace(e, "RuntimeException:\n"); Window.alert(s); e.printStackTrace(); } }); new Timer() { @Override public void run() { initialize(); } }.schedule(1); alertSomeStuff(); }
public void load() { RootPanel rootPanel = RootPanel.get(); rootPanel.setSize("100%", "100%"); // IPhoneTouchListener phoneTouchListener = new IPhoneTouchListener() { // @Override // public boolean event(JavaScriptObject source, String name, int[] x, int[] y, JavaScriptObject target) { // return superEvent(source, name, x, y, target); // } // }; // phoneTouchListener.addListener(rootPanel.getElement(),IPhoneTouchListener.TOUCHSTART,false); // phoneTouchListener.addListener(rootPanel.getElement(),IPhoneTouchListener.TOUCHMOVE,false); if (GWT.isScript()) { GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler(){ public void onUncaughtException(Throwable e) { IPhoneConsole.showError(e); } }); } load(true); rootPanel.add(layout); }
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(); } }); }
/** * Takes care of reporting exceptions to the console in hosted mode. * * @param listener the listener object to call back. * @param port argument from the callback. */ private static void onErrorImpl(ErrorHandler errorHandler, ErrorEvent event) { UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler(); if (ueh != null) { try { errorHandler.onError(event); } catch (Exception ex) { ueh.onUncaughtException(ex); } } else { errorHandler.onError(event); } }
/** * Takes care of reporting exceptions to the console in hosted mode. * * @param listener the listener object to call back. * @param port argument from the callback. */ private static void onMessageImpl(MessageHandler messageHandler, MessageEvent event) { UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler(); if (ueh != null) { try { messageHandler.onMessage(event); } catch (Exception ex) { ueh.onUncaughtException(ex); } } else { messageHandler.onMessage(event); } }
private final void fireOnEvent() { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(handler); } else { onInit(); } }
private void fireOnEventAndCatch(UncaughtExceptionHandler handler) { try { onInit(); } catch (Throwable e) { handler.onUncaughtException(e); } }
public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); rootPanel.setSize("100%", "100%"); if (GWT.isScript()) { GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler(){ public void onUncaughtException(Throwable e) { IPhoneConsole.showError(e); } }); } load(true); rootPanel.add(layout); }
public void load() { RootPanel rootPanel = RootPanel.get(); rootPanel.setSize("100%", "100%"); if (GWT.isScript()) { GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler(){ public void onUncaughtException(Throwable e) { IPhoneConsole.showError(e); } }); } load(true); rootPanel.add(layout); }
private void fireOnEventAndCatch(Container container, Container value, Container oldValue, Object eOpts, UncaughtExceptionHandler handler) { try { onActiveItemChange(container, value, oldValue, eOpts); } catch (Throwable e) { handler.onUncaughtException(e); } }
private final void fireOnEvent(Component component, Object existingValue, Object newValue, Object eOpts) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(component, existingValue, newValue, eOpts, handler); } else { onTopChange(component, existingValue, newValue, eOpts); } }
private final void fireOnEvent(Panel panel, String orientation, double width, double height) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(panel, orientation, width, height, handler); } else { onBeforeOrientationChange(panel, orientation, width, height); } }
public final void onFailure(Throwable reason) { reason.printStackTrace(); GWT.log("Run async failure", reason); if (tries-->0){ dispatch(); }else{ UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) handler.onUncaughtException(reason); } }
private void fireOnEventAndCatch(Container container, Object item, boolean rendered, Object eOpts, UncaughtExceptionHandler handler) { try { onRenderChange(container, item, rendered, eOpts); } catch (Throwable e) { handler.onUncaughtException(e); } }
private final void fireOnEvent(Container container, Container value, Container oldValue, Object eOpts) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(container, value, oldValue, eOpts, handler); } else { onActiveItemChange(container, value, oldValue, eOpts); } }
private void fireOnEventAndCatch(Image image, EventObject eventObject, Object eOpts, UncaughtExceptionHandler handler) { try { onTap(image, eventObject, eOpts); } catch (Throwable e) { handler.onUncaughtException(e); } }
private void fireOnEventAndCatch(Panel panel, String orientation, double width, double height, UncaughtExceptionHandler handler) { try { onBeforeOrientationChange(panel, orientation, width, height); } catch (Throwable e) { handler.onUncaughtException(e); } }
/** * This method sets up the top-level services used by the application. */ public void onModuleLoad() { GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { public void onUncaughtException(Throwable e) { log.log(Level.SEVERE, e.getMessage(), e); } }); final DynaTableRequestFactory requests = GWT.create(DynaTableRequestFactory.class); requests.initialize(eventBus); // Add remote logging handler RequestFactoryLogHandler.LoggingRequestProvider provider = new RequestFactoryLogHandler.LoggingRequestProvider() { public LoggingRequest getLoggingRequest() { return requests.loggingRequest(); } }; Logger.getLogger("").addHandler(new ErrorDialog().getHandler()); Logger.getLogger("").addHandler( new RequestFactoryLogHandler(provider, Level.WARNING, new ArrayList<String>())); FavoritesManager manager = new FavoritesManager(requests); PersonEditorWorkflow.register(eventBus, requests, manager); calendar = new SummaryWidget(eventBus, requests, 15); favorites = new FavoritesWidget(eventBus, requests, manager); filter = new DayFilterWidget(eventBus); RootLayoutPanel.get().add( GWT.<Binder> create(Binder.class).createAndBindUi(this)); // Fast test to see if the sample is not being run from devmode if (GWT.getHostPageBaseURL().startsWith("file:")) { log.log(Level.SEVERE, "The DynaTableRf sample cannot be run without its" + " server component. If you are running the sample from a" + " GWT distribution, use the 'ant devmode' target to launch" + " the DTRF server."); } }
private final void fireOnEvent(Component component, Object eOpts) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(component, eOpts, handler); } else { onResize(component, eOpts); } }
private final void fireOnEvent(FormPanel panel, Object result, EventObject event, Object eOpts) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(panel, result, event, eOpts, handler); } else { onSubmit(panel, result, event, eOpts); } }
private void fireOnEventAndCatch(Button btn, EventObject event, UncaughtExceptionHandler handler) { try { onTap(btn, event); } catch (Throwable e) { handler.onUncaughtException(e); } }
private final void fireOnEvent(Component component, Object existingValue, Object newValue, Object eOpts) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(component, existingValue, newValue, eOpts, handler); } else { onBottomChange(component, existingValue, newValue, eOpts); } }
private void fireOnEventAndCatch(FormPanel panel, Object values, Object options, Object eOpts, UncaughtExceptionHandler handler) { try { onBeforeSubmit(panel, values, options, eOpts); } catch (Throwable e) { handler.onUncaughtException(e); } }
private final void fireOnEvent(Component comp) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(comp, handler); } else { onDeactive(comp); } }
private final void fireOnEvent(Component component, boolean existingValue, boolean newValue, Object eOpts) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(component, existingValue, newValue, eOpts, handler); } else { onCenteredChange(component, existingValue, newValue, eOpts); } }
private void fireOnEventAndCatch(Component component, Object existingValue, Object newValue, Object eOpts, UncaughtExceptionHandler handler) { try { onRightChange(component, existingValue, newValue, eOpts); } catch (Throwable e) { handler.onUncaughtException(e); } }
private void fireOnEventAndCatch(Component component, Object existingValue, Object newValue, Object eOpts, UncaughtExceptionHandler handler) { try { onTopChange(component, existingValue, newValue, eOpts); } catch (Throwable e) { handler.onUncaughtException(e); } }
private void fireOnEventAndCatch(Component comp, UncaughtExceptionHandler handler) { try { onDeactive(comp); } catch (Throwable e) { handler.onUncaughtException(e); } }
private void fireOnEventAndCatch(DataView dataView, BaseModel record, Boolean supressed, Object eOpts, UncaughtExceptionHandler handler) { try { onDoSelect(dataView, record, supressed, eOpts); } catch (Throwable e) { handler.onUncaughtException(e); } }
private final void fireOnEvent(DataView dataView, double index, Element element, EventObject eventObject, Object eOpts) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(dataView, index, element, eventObject, eOpts, handler); } else { onItemTouchStart(dataView, index, element, eventObject, eOpts); } }
private void fireOnEventAndCatch(DataView dataView, double index, Element element, EventObject eventObject, Object eOpts, UncaughtExceptionHandler handler) { try { onItemTouchStart(dataView, index, element, eventObject, eOpts); } catch (Throwable e) { handler.onUncaughtException(e); } }
private final void fireOnEvent(DataView dataView, Object eOpts) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(dataView, eOpts, handler); } else { onRefresh(dataView, eOpts); } }
private void fireOnEventAndCatch(DataView dataView, Object eOpts, UncaughtExceptionHandler handler) { try { onRefresh(dataView, eOpts); } catch (Throwable e) { handler.onUncaughtException(e); } }
private final void fireOnEvent(Component comp) { UncaughtExceptionHandler handler = GWT.getUncaughtExceptionHandler(); if (handler != null) { fireOnEventAndCatch(comp, handler); } else { onRender(comp); } }
private void fireOnEventAndCatch(DataView dataView, BaseModel record, Object eOpts, UncaughtExceptionHandler handler) { try { onSelect(dataView, record, eOpts); } catch (Throwable e) { handler.onUncaughtException(e); } }