From 44aeee1c95e9ccb4266dd3be785e685abfb674f1 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 21 Jun 2012 17:58:15 +0300 Subject: [PATCH] Avoid infinite loop when producing error message (#8618) --- src/com/vaadin/terminal/AbstractErrorMessage.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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()); } } -- 2.39.5