summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java33
-rw-r--r--src/com/vaadin/terminal/gwt/client/VDebugConsole.java16
2 files changed, 14 insertions, 35 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java
index fabaeddc78..170e949116 100644
--- a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java
+++ b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java
@@ -16,11 +16,9 @@ import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
-import com.google.gwt.event.shared.UmbrellaException;
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 {
@@ -574,19 +572,6 @@ public class ApplicationConfiguration implements EntryPoint {
* especially end user. It does not work tells just as much.
*/
VConsole.getImplementation().error(e);
-
- if (!GWT.isProdMode()) {
- e.printStackTrace();
- }
-
- try {
- VNotification.createNotification(
- VNotification.DELAY_FOREVER).show(
- getExceptionText(e), VNotification.CENTERED,
- "error");
- } catch (Exception e2) {
- // Just swallow this exception
- }
}
});
@@ -594,24 +579,6 @@ public class ApplicationConfiguration implements EntryPoint {
deferredWidgetLoader = new DeferredWidgetLoader();
}
- private static final String getExceptionText(Throwable e) {
- if (e instanceof UmbrellaException) {
- UmbrellaException ue = (UmbrellaException) e;
- String text = "";
- for (Throwable t : ue.getCauses()) {
- text += getExceptionText(t) + "<br />";
- }
- return text;
- } else {
- String text = e.getClass().getName();
- String message = e.getMessage();
- if (message != null) {
- text += ": " + message;
- }
- return text;
- }
- }
-
/**
* Registers that callback that the bootstrap javascript uses to start
* applications once the widgetset is loaded and all required information is
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() {