1     //获取异常原因详情
2     public static String getExceptionInfo(Exception ex){
3         String sOut = ex.toString()+ "\r\n";
4         StackTraceElement[] trace = ex.getStackTrace();
5         for (StackTraceElement s : trace) {
6             sOut += "\tat " + s + "\r\n";
7         }
8         return sOut;
9     }

 

posted on 2022-01-17 14:42  奈文摩尔ゞ  阅读(40)  评论(0编辑  收藏  举报