/** 获取异常详细信息 */
private String getExceptionDetail(Exception ex) { String ret = null; try { ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream pout = new PrintStream(out); ex.printStackTrace(pout); ret = new String(out.toByteArray()); pout.close(); out.close(); } catch (Exception e) { } return ret; }
以上。
标签:java,String,pout,ret,获取,new,详细信息,out From: https://www.cnblogs.com/qienkant/p/17636666.html