</pre><p></p><p><pre name="code" class="java">/**
* 获取异常信息字符串
* @param e
* @return
*/
private static String getExceptionString(Exception e){
ByteArrayOutputStream baos = new ByteArrayOutputStream();
e.printStackTrace(new PrintStream(baos));
String exception = baos.toString();
return exception;
}
获取异常的字符串信息
最新推荐文章于 2022-07-06 16:05:57 发布