private static String getPrintableStackTrace(final Throwable t) {
    final StringWriter stackTraceWriter = new StringWriter();
    t.printStackTrace(new PrintWriter(stackTraceWriter));
    return stackTraceWriter.toString();
  }
Writes the stack trace of the Throwable to a String.

@param t a Throwable object who's stack trace will be written to a String.
@return a String containing the stack trace of the Throwable.
@see java.io.StringWriter
@see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
geode-web/src/main/java/org/apache/geode/management/internal/web/controllers/AbstractCommandsController.java