]> source.dussan.org Git - vaadin-framework.git/commitdiff
Avoid infinite loop when producing error message (#8618)
authorArtur Signell <artur@vaadin.com>
Thu, 21 Jun 2012 14:58:15 +0000 (17:58 +0300)
committerArtur Signell <artur@vaadin.com>
Thu, 21 Jun 2012 14:58:15 +0000 (17:58 +0300)
src/com/vaadin/terminal/AbstractErrorMessage.java

index 1a625fc0e6505a7be664c49a1d9253c38d7355b4..3f526f7339b4f861d802ef2e5273ee5ef4e8e1a2 100644 (file)
@@ -4,6 +4,8 @@
 
 package com.vaadin.terminal;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -156,7 +158,10 @@ public abstract class AbstractErrorMessage implements ErrorMessage {
             }
             return error;
         } else {
-            return new SystemError(t);
+            StringWriter sw = new StringWriter();
+            PrintWriter pw = new PrintWriter(sw);
+            t.printStackTrace(pw);
+            return new SystemError(sw.toString());
         }
     }