]> source.dussan.org Git - vaadin-framework.git/commitdiff
Also show the exception type
authorLeif Åstrand <leif@vaadin.com>
Thu, 22 Mar 2012 09:45:56 +0000 (11:45 +0200)
committerLeif Åstrand <leif@vaadin.com>
Thu, 22 Mar 2012 09:46:50 +0000 (11:46 +0200)
src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java

index 26a1329212d20fd7fd181c23ee49047cce2d6698..8be2d33838f82ab490c5dfd795dc08dee408857a 100644 (file)
@@ -564,7 +564,7 @@ public class ApplicationConfiguration implements EntryPoint {
                 try {
                     VNotification.createNotification(
                             VNotification.DELAY_FOREVER).show(
-                            getExceptionMessage(e), VNotification.CENTERED,
+                            getExceptionText(e), VNotification.CENTERED,
                             "error");
                 } catch (Exception e2) {
                     // Just swallow this exception
@@ -576,16 +576,21 @@ public class ApplicationConfiguration implements EntryPoint {
         deferredWidgetLoader = new DeferredWidgetLoader();
     }
 
-    private static final String getExceptionMessage(Throwable e) {
+    private static final String getExceptionText(Throwable e) {
         if (e instanceof UmbrellaException) {
             UmbrellaException ue = (UmbrellaException) e;
-            String message = "";
+            String text = "";
             for (Throwable t : ue.getCauses()) {
-                message += getExceptionMessage(t) + "<br />";
+                text += getExceptionText(t) + "<br />";
             }
-            return message;
+            return text;
         } else {
-            return e.getMessage();
+            String text = e.getClass().getName();
+            String message = e.getMessage();
+            if (message != null) {
+                text += ": " + message;
+            }
+            return text;
         }
     }