private static String stackTraceToString(Throwable t){
  final StringBuilder sb=new StringBuilder();
  final String indent="\tat ";
  for (  StackTraceElement frame : t.getStackTrace()) {
    sb.append(indent);
    sb.append(frame.toString());
    sb.append("\n");
  }
  return sb.toString();
}

private static String stackTraceToString ( Throwable t ) { final StringBuilder sb = new StringBuilder ( ) ; final String indent = "\tat " ; for ( StackTraceElement frame : t . getStackTrace ( ) ) { sb . append ( indent ) ; sb . append ( frame . toString ( ) ) ; sb . append ( "\n" ) ; } return sb . toString ( ) ; }
return a string representation of the input throwable ' s call stack . this is used instead of the typical stringwriter ( printwriter ( ) ) usage to get redundant " caused by " information , since the latter would be abbreviated and we would like full stacks for causers .
