]> source.dussan.org Git - vaadin-framework.git/commitdiff
Show uncaught exceptions as notifications (#8544)
authorLeif Åstrand <leif@vaadin.com>
Wed, 21 Mar 2012 09:36:17 +0000 (11:36 +0200)
committerLeif Åstrand <leif@vaadin.com>
Wed, 21 Mar 2012 09:36:17 +0000 (11:36 +0200)
src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java

index bb094bf9162da7fbf17e0e0a4287a976b733a625..fac6cfc40c2f75acdefd79d2decc6d4688ae7979 100644 (file)
@@ -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
+                }
             }
         });