We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a74934 commit 2dd1ccdCopy full SHA for 2dd1ccd
src/main/java/org/scijava/event/SciJavaEvent.java
@@ -33,6 +33,7 @@
33
package org.scijava.event;
34
35
import org.scijava.AbstractContextual;
36
+import org.scijava.util.DebugUtils;
37
38
/**
39
* Base class for all SciJava events.
@@ -83,6 +84,14 @@ public StackTraceElement[] getStackTrace() {
83
84
return stackTrace;
85
}
86
87
+ /**
88
+ * Gets a stack trace for the calling thread when the event was published.
89
+ * This method is useful for debugging what triggered an event.
90
+ */
91
+ public String dumpStack() {
92
+ return DebugUtils.getStackDump(getCallingThread(), getStackTrace());
93
+ }
94
+
95
// Object methods --
96
97
@Override
0 commit comments