summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-04-17 10:29:38 +0300
committerLeif Åstrand <leif@vaadin.com>2012-04-17 10:29:38 +0300
commit78c6bf089beadb93b8377df5a0144cf98b408484 (patch)
tree778ad00288907dc115683ff7a2ac2373c65fef76
parentd813539290743935242fb001b8e3c1e64c3a5122 (diff)
downloadvaadin-framework-78c6bf089beadb93b8377df5a0144cf98b408484.tar.gz
vaadin-framework-78c6bf089beadb93b8377df5a0144cf98b408484.zip
Make client side exception more obvious again (#8544)
-rw-r--r--src/com/vaadin/terminal/gwt/client/NullConsole.java3
-rw-r--r--src/com/vaadin/terminal/gwt/client/VDebugConsole.java8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/NullConsole.java b/src/com/vaadin/terminal/gwt/client/NullConsole.java
index 1d9de90118..2d15ffd46c 100644
--- a/src/com/vaadin/terminal/gwt/client/NullConsole.java
+++ b/src/com/vaadin/terminal/gwt/client/NullConsole.java
@@ -41,7 +41,8 @@ public class NullConsole implements Console {
}
public void error(Throwable e) {
- GWT.log(e.getMessage(), e);
+ // Borrow exception handling from VDebugConsole
+ VDebugConsole.handleError(e, this);
}
public void setQuietMode(boolean quietDebugMode) {
diff --git a/src/com/vaadin/terminal/gwt/client/VDebugConsole.java b/src/com/vaadin/terminal/gwt/client/VDebugConsole.java
index e3cacc5870..c2fa4f46bf 100644
--- a/src/com/vaadin/terminal/gwt/client/VDebugConsole.java
+++ b/src/com/vaadin/terminal/gwt/client/VDebugConsole.java
@@ -626,10 +626,14 @@ public class VDebugConsole extends VOverlay implements Console {
}
public void error(Throwable e) {
+ handleError(e, this);
+ }
+
+ static void handleError(Throwable e, Console target) {
if (e instanceof UmbrellaException) {
UmbrellaException ue = (UmbrellaException) e;
for (Throwable t : ue.getCauses()) {
- error(t);
+ target.error(t);
}
return;
}
@@ -638,7 +642,7 @@ public class VDebugConsole extends VOverlay implements Console {
if (message != null && message.length() != 0) {
exceptionText += ": " + e.getMessage();
}
- error(exceptionText);
+ target.error(exceptionText);
GWT.log(e.getMessage(), e);
if (!GWT.isProdMode()) {
e.printStackTrace();