What is the easiest way to convert the result of Throwable.getStackTrace() to a string that depicts the stacktrace?
Throwable.getStackTrace()
I wonder why no one mentioned ExceptionUtils.getStackFrames(exception)
ExceptionUtils.getStackFrames(exception)
For me it's the most convenient way to dump stacktrace with all its causes to the end:
String.join("\n", ExceptionUtils.getStackFrames(exception));