]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Add stack trace to document server event handler error messages 57/257/4
authorJussi Koskela <jussi.koskela@semantum.fi>
Mon, 9 Jan 2017 15:36:45 +0000 (17:36 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 12 Jan 2017 09:05:24 +0000 (11:05 +0200)
refs #6944
Change-Id: I0a757d6b65ad1e8a5690ed9106f7f112303d3e34

bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java

index 3b99f325230851441f7f19c1c45709b8446e5a69..25bec0c919248d5efc14c54d921f3b3f5ea5fbba 100644 (file)
@@ -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();
                                                }