diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-04-10 14:28:38 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-04-10 14:28:59 +0300 |
commit | efff4e68706c13b180be331129664fee08c047e7 (patch) | |
tree | 093fc90c01677f0c8ac8609e64d8bef01316fdb1 /src/com/vaadin/terminal/gwt/client/VDebugConsole.java | |
parent | 06e9398f651278103e7e1333e4944827d191e2ab (diff) | |
download | vaadin-framework-efff4e68706c13b180be331129664fee08c047e7.tar.gz vaadin-framework-efff4e68706c13b180be331129664fee08c047e7.zip |
Update #8544 to be more verbose and to show more exceptions
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/VDebugConsole.java')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/VDebugConsole.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/VDebugConsole.java b/src/com/vaadin/terminal/gwt/client/VDebugConsole.java index fea777ff72..c457044ea9 100644 --- a/src/com/vaadin/terminal/gwt/client/VDebugConsole.java +++ b/src/com/vaadin/terminal/gwt/client/VDebugConsole.java @@ -54,6 +54,7 @@ import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ui.RootConnector; import com.vaadin.terminal.gwt.client.ui.VLazyExecutor; +import com.vaadin.terminal.gwt.client.ui.VNotification; import com.vaadin.terminal.gwt.client.ui.VOverlay; import com.vaadin.terminal.gwt.client.ui.VWindow; @@ -632,12 +633,23 @@ public class VDebugConsole extends VOverlay implements Console { } return; } - error(Util.getSimpleName(e) + ": " + e.getMessage()); + String exceptionText = Util.getSimpleName(e); + String message = e.getMessage(); + if (message != null && message.length() != 0) { + exceptionText += ": " + e.getMessage(); + } + error(exceptionText); GWT.log(e.getMessage(), e); if (!GWT.isProdMode()) { e.printStackTrace(); } - + try { + VNotification.createNotification(VNotification.DELAY_FOREVER).show( + "<h1>Uncaught client side exception</h1><br />" + + exceptionText, VNotification.CENTERED, "error"); + } catch (Exception e2) { + // Just swallow this exception + } } public void init() { |