question: public static String exceptionStackTraceToString ( Exception ex ) { StringWriter errors = new StringWriter ( ) ; ex . printStackTrace ( new PrintWriter ( errors ) ) ; return errors . toString ( ) ; }
target:  Create a String from stacktrace