java print stack trace to string

68

java print stack trace to string -

StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
String exceptionAsString = sw.toString();

Comments

Submit
0 Comments