protected static String printStackTrace(final Throwable t){
  final StringWriter stackTraceWriter=new StringWriter();
  t.printStackTrace(new PrintWriter(stackTraceWriter));
  return stackTraceWriter.toString();
}

protected static String printStackTrace ( 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 .
