code: private static String stackTraceToString(List<StackTraceElement> stack) {
  		return StringPrinter.buildString(printer -> {
  			for (StackTraceElement element : stack) {
  				printer.print("at ");
  				printer.print(element.getClassName());
  				printer.print(".");
  				printer.print(element.getMethodName());
  				printer.print("(");
  				printer.print(element.getFileName());
  				printer.print(":");
  				printer.print(Integer.toString(element.getLineNumber()));
  				printer.println(")");
  			}
  		});
  	}
docs: Converts a list of stack trace elements to a String similar to Throwable.printStackTrace().