标签:
/** * 把异常的栈轨迹以String形式返回,而不是直接打印到console * @author King * @time 2015-04-29 * @return */ public static String getLongInfo(Throwable e){ StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw, true); e.printStackTrace(pw); pw.flush(); sw.flush(); return sw.toString(); }
标签:
原文地址:http://www.cnblogs.com/whatlonelytear/p/4919398.html