/** * Get a string containing the stack of the specified exception * * @param e * @return */ protected static String stackToString(Throwable e) { java.io.StringWriter sw = new java.io.StringWriter(); java.io.BufferedWriter bw = new java.io.BufferedWriter(sw); java.io.PrintWriter pw = new java.io.PrintWriter(bw); e.printStackTrace(pw); pw.close(); String text = sw.getBuffer().toString(); // Jump past the throwable text = text.substring(text.indexOf("at")); text = replace(text, "at ", "DEBUG_FRAME = "); return text; }
/** * Get a string containing the stack of the specified exception * * @param e * @return */ protected static String stackToString(Throwable e) { java.io.StringWriter sw = new java.io.StringWriter(); java.io.BufferedWriter bw = new java.io.BufferedWriter(sw); java.io.PrintWriter pw = new java.io.PrintWriter(bw); e.printStackTrace(pw); pw.close(); String text = sw.getBuffer().toString(); // Jump past the throwable text = text.substring(text.indexOf("at")); text = replace(text, "at ", "DEBUG_FRAME = "); return text; }