java print stack trace to string

73

java print stack trace to string -

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

Comments

Submit
0 Comments