From: Artur Signell Date: Thu, 21 Jun 2012 14:58:15 +0000 (+0300) Subject: Avoid infinite loop when producing error message (#8618) X-Git-Tag: 7.0.0.alpha3~73 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=44aeee1c95e9ccb4266dd3be785e685abfb674f1;p=vaadin-framework.git Avoid infinite loop when producing error message (#8618) --- diff --git a/src/com/vaadin/terminal/AbstractErrorMessage.java b/src/com/vaadin/terminal/AbstractErrorMessage.java index 1a625fc0e6..3f526f7339 100644 --- a/src/com/vaadin/terminal/AbstractErrorMessage.java +++ b/src/com/vaadin/terminal/AbstractErrorMessage.java @@ -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()); } }