把异常的栈轨迹以String形式返回
/**
* 把异常的栈轨迹以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();
}