public static String stringifyException(Throwable e){
  StringWriter stm=new StringWriter();
  PrintWriter wrt=new PrintWriter(stm);
  e.printStackTrace(wrt);
  wrt.close();
  return stm.toString();
}

public static String stringifyException ( Throwable e ) { StringWriter stm = new StringWriter ( ) ; PrintWriter wrt = new PrintWriter ( stm ) ; e . printStackTrace ( wrt ) ; wrt . close ( ) ; return stm . toString ( ) ; }
make a string representation of the exception .
