public static String getStackTrace(Throwable aThrowable) { Writer result = new StringWriter(); PrintWriter printWriter = new PrintWriter(result); aThrowable.printStackTrace(printWriter); return result.toString(); }
Read full article from Java Practices -> Stack trace as String
No comments:
Post a Comment