Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Transforms a Exception stack trace into String.
- * @param e The exception to be transformed.
- * @return A string with the stack trace text.
- */
- public String exception2String(Exception e) {
- StringWriter sw = new StringWriter();
- PrintWriter pw = new PrintWriter(sw);
- e.printStackTrace(pw);
- return pw.toString();
- }
Add Comment
Please, Sign In to add comment