public static String getLogInfo(Exception e){
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw, true));
return sw.toString();
}
Java Exception转String
最新推荐文章于 2023-06-06 22:46:45 发布
public static String getLogInfo(Exception e){
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw, true));
return sw.toString();
}