From efec7759cf9f153cf368f2ece6fed67f0d1632b1 Mon Sep 17 00:00:00 2001 From: Jussi Koskela Date: Mon, 9 Jan 2017 17:36:45 +0200 Subject: [PATCH] Add stack trace to document server event handler error messages refs #6944 Change-Id: I0a757d6b65ad1e8a5690ed9106f7f112303d3e34 --- .../src/org/simantics/document/server/Functions.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java b/bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java index 3b99f3252..25bec0c91 100644 --- a/bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java +++ b/bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java @@ -1,5 +1,7 @@ package org.simantics.document.server; +import java.io.PrintWriter; +import java.io.StringWriter; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -651,6 +653,11 @@ public class Functions { message.append(" handler=" + path + "\n"); message.append(" expression=" + expr + "\n"); message.append(" message=" + t.getMessage() + "\n"); + + StringWriter sw = new StringWriter(); + t.printStackTrace(new PrintWriter(sw)); + message.append(" stack trace=" + sw); + return message.toString(); } -- 2.47.1