public static String getStackTrace ( Throwable th ) { StringWriter sw = new StringWriter ( ) ; PrintWriter pw = new PrintWriter ( sw ) ; th . printStackTrace ( pw ) ; return sw . toString ( ) ; }
Returns the stack trace of the throwable as a string