]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #3712. Bit ugly fix but most likely nobody knows about XML type error messages
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 16 Nov 2009 14:27:57 +0000 (14:27 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 16 Nov 2009 14:27:57 +0000 (14:27 +0000)
svn changeset:9819/svn branch:6.2

src/com/vaadin/terminal/gwt/client/VErrorMessage.java

index ba25dd23dba933ea3bcd0471af3722a5001a970b..ba5d5a9d241afd47a34813a2e63cecfcb57a579d 100644 (file)
@@ -30,13 +30,18 @@ public class VErrorMessage extends FlowPanel {
                 if (child instanceof String) {
                     final String errorMessage = (String) child;
                     add(new HTML(errorMessage));
-                } else if (child instanceof UIDL.XML) {
-                    final UIDL.XML xml = (UIDL.XML) child;
-                    add(new HTML(xml.getXMLAsString()));
                 } else {
-                    final VErrorMessage childError = new VErrorMessage();
-                    add(childError);
-                    childError.updateFromUIDL((UIDL) child);
+                    try {
+                        final VErrorMessage childError = new VErrorMessage();
+                        childError.updateFromUIDL((UIDL) child);
+                        add(childError);
+                    } catch (Exception e) {
+                        // TODO XML type error, check if this can even happen
+                        // anymore??
+                        final UIDL.XML xml = (UIDL.XML) child;
+                        add(new HTML(xml.getXMLAsString()));
+
+                    }
                 }
             }
         }