From: Jussi Koskela Date: Mon, 9 Jan 2017 15:36:45 +0000 (+0200) Subject: Add stack trace to document server event handler error messages X-Git-Tag: v1.27.0~27 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F57%2F257%2F4;p=simantics%2Fplatform.git Add stack trace to document server event handler error messages refs #6944 Change-Id: I0a757d6b65ad1e8a5690ed9106f7f112303d3e34 --- 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(); }