Created
March 6, 2014 22:03
-
-
Save greyaperez/9400708 to your computer and use it in GitHub Desktop.
That returns an array of StackTraceElements that represent the current stack trace of a program.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Array of StackTraceElements | |
Thread.currentThread().getStackTrace(); | |
// Return as String, (Uses Apache Commons Lib) | |
String fullStackTrace = org.apache.commons.lang.exception.ExceptionUtils.getFullStackTrace(e); | |
// Get Defined Position of Current Method | |
(new Throwable()).getStackTrace(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment