public static String exceptionToString(Throwable t){
  StringWriter sw=new StringWriter();
  PrintWriter out=new PrintWriter(sw);
  printExceptionStack(t,out,0);
  return sw.toString();
}

public static String exceptionToString ( Throwable t ) { StringWriter sw = new StringWriter ( ) ; PrintWriter out = new PrintWriter ( sw ) ; printExceptionStack ( t , out , 0 ) ; return sw . toString ( ) ; }
utility method for converting an exception into a string . this method unwinds all wrapped exceptions
