Get Exception StackTrace as a String

public static String getStackTraceString(Exception e) {
	StringWriter writer = new StringWriter();
	PrintWriter pw = new PrintWriter(writer);
	e.printStackTrace(pw);
	StringBuffer sb = writer.getBuffer();
	return sb.toString();
}

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

AddThis Social Bookmark Button

Similar Posts

Comments are closed.