From: Leif Åstrand Date: Wed, 21 Mar 2012 09:36:17 +0000 (+0200) Subject: Show uncaught exceptions as notifications (#8544) X-Git-Tag: 7.0.0.alpha2~293 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=92259e400df5157ea2ca88db1eb9a5e27eea1cd5;p=vaadin-framework.git Show uncaught exceptions as notifications (#8544) --- diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java index bb094bf916..fac6cfc40c 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java @@ -18,6 +18,7 @@ import com.google.gwt.core.client.Scheduler.ScheduledCommand; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Timer; import com.vaadin.terminal.gwt.client.ui.UnknownComponentConnector; +import com.vaadin.terminal.gwt.client.ui.VNotification; public class ApplicationConfiguration implements EntryPoint { @@ -558,6 +559,14 @@ public class ApplicationConfiguration implements EntryPoint { * especially end user. It does not work tells just as much. */ VConsole.getImplementation().error(e); + + try { + VNotification.createNotification( + VNotification.DELAY_FOREVER).show(e.getMessage(), + VNotification.CENTERED, "error"); + } catch (Exception e2) { + // Just swallow this exception + } } });