public static String throwableToString ( Throwable t ) { StringWriter s = new StringWriter ( ) ; PrintWriter p = new PrintWriter ( s ) ; t . printStackTrace ( p ) ; return s . toString ( ) ; }
Accepts a throwable and returns a String representation .