MCPcopy Create free account
hub / github.com/QianmiOpen/interface-test / getStackTrace

Method getStackTrace

src/main/java/com/qianmi/tda/util/Tools.java:77–82  ·  view source on GitHub ↗

将Throwable转换为字符串描述的堆栈信息 @param throwable 异常信息

(Throwable throwable)

Source from the content-addressed store, hash-verified

75 * @param throwable 异常信息
76 */
77 public static String getStackTrace(Throwable throwable) {
78 final Writer result = new StringWriter();
79 final PrintWriter printWriter = new PrintWriter(result);
80 throwable.printStackTrace(printWriter);
81 return result.toString();
82 }
83
84 /**
85 * JSON字符串格式化

Callers 2

generateMethod · 0.95
runMethod · 0.95

Calls

no outgoing calls

Tested by 2

generateMethod · 0.76
runMethod · 0.76