summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/client/VDebugConsole.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-04-10 14:28:38 +0300
committerLeif Åstrand <leif@vaadin.com>2012-04-10 14:28:59 +0300
commitefff4e68706c13b180be331129664fee08c047e7 (patch)
tree093fc90c01677f0c8ac8609e64d8bef01316fdb1 /src/com/vaadin/terminal/gwt/client/VDebugConsole.java
parent06e9398f651278103e7e1333e4944827d191e2ab (diff)
downloadvaadin-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.java16
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() {