Skip to content

Instantly share code, notes, and snippets.

@Alexander01998
Created May 11, 2015 12:34
Show Gist options
  • Save Alexander01998/1fff7438daddfbfbbc9a to your computer and use it in GitHub Desktop.
Save Alexander01998/1fff7438daddfbfbbc9a to your computer and use it in GitHub Desktop.
Converts a stack trace to a String.
StringWriter traceWriter = new StringWriter();
e.printStackTrace(new PrintWriter(traceWriter));
String trace = traceWriter.toString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment