Created
April 19, 2018 14:55
-
-
Save swarupdonepudi/3fea99a44cfa99e14c36fc71085c1d8c to your computer and use it in GitHub Desktop.
Converting Java stack trace to a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String convertStackTraceToString(Exception e) { | |
StringWriter sw = new StringWriter(); | |
e.printStackTrace(new PrintWriter(sw)); | |
return sw.toString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment