📜  java 将堆栈跟踪打印到字符串 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:32.713000             🧑  作者: Mango

代码示例1
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
String exceptionAsString = sw.toString();