What is the easiest way to convert the result of Throwable.getStackTrace() to a string that depicts the stacktrace?
Throwable.getStackTrace()
private String getCurrentStackTraceString() { StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); return Arrays.stream(stackTrace).map(StackTraceElement::toString) .collect(Collectors.joining("\n")); }