From 92259e400df5157ea2ca88db1eb9a5e27eea1cd5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Wed, 21 Mar 2012 11:36:17 +0200 Subject: [PATCH] Show uncaught exceptions as notifications (#8544) --- .../terminal/gwt/client/ApplicationConfiguration.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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 + } } }); -- 2.39.5