堆栈信息转成字符串打印

StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);

sw.toString()

posted @ 2023-07-17 14:43  life_start  阅读(13)  评论(0编辑  收藏  举报