question: public static String formatException ( Exception exc ) { StringWriter stringWriter = new StringWriter ( ) ; PrintWriter printWriter = new PrintWriter ( stringWriter ) ; exc . printStackTrace ( printWriter ) ; try { stringWriter . close ( ) ; } catch ( IOException ex ) { } return stringWriter . toString ( ) ; }
target:  Format the exception into a string that can be displayed.