文档解析应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
492 B

6 months ago
  1. package com.bfd.parse.utils;
  2. import java.io.PrintWriter;
  3. import java.io.StringWriter;
  4. /**
  5. * @author jian.mao
  6. * @date 2023年3月22日
  7. * @description
  8. */
  9. public class ThrowMessageUtil {
  10. /**
  11. * 获取异常信息
  12. * @param t
  13. * @return
  14. */
  15. public static String getErrmessage(Throwable t){
  16. StringWriter stringWriter=new StringWriter();
  17. t.printStackTrace(new PrintWriter(stringWriter,true));
  18. return stringWriter.getBuffer().toString();
  19. }
  20. }