public static String toString(Throwable t){
  StringWriter strWrt=new StringWriter();
  t.printStackTrace(new PrintWriter(strWrt));
  return strWrt.toString();
}

public static String toString ( Throwable t ) { StringWriter strWrt = new StringWriter ( ) ; t . printStackTrace ( new PrintWriter ( strWrt ) ) ; return strWrt . toString ( ) ; }
return the stack trace in a string
