Maybe many times you would like to generate stack trace string from Exception thrown.
The code below will help you!
The code below will help you!
public final static String createStackTraceString(Exception e){ StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw, false); e.printStackTrace(writer); return sw.toString(); }
コメント