public static String getExceptionStackTrace(Throwable ex)
{
Writer info = new StringWriter();
PrintWriter printWriter = new PrintWriter(info);
ex.printStackTrace(printWriter);
Throwable cause = ex.getCause();
while (cause != null)
{
cause.printStackTrace(printWriter);
cause = cause.getCause();
}
return info.toString();
}
根据exception 异常堆栈信息
最新推荐文章于 2022-01-30 20:42:59 发布