public static String extractFullStackTrace(Throwable e){
  StringWriter stringWriter=new StringWriter();
  PrintWriter printWriter=new PrintWriter(stringWriter);
  e.printStackTrace(printWriter);
  return stringWriter.toString();
}

public static String extractFullStackTrace ( Throwable e ) { StringWriter stringWriter = new StringWriter ( ) ; PrintWriter printWriter = new PrintWriter ( stringWriter ) ; e . printStackTrace ( printWriter ) ; return stringWriter . toString ( ) ; }
extract the full stack trace :
