/** * 获取异常的堆栈信息. * * @param e * @return */ private String getExceptionStackTrace(Exception e) { ByteArrayOutputStream buf = new ByteArrayOutputStream(); e.printStackTrace(new java.io.PrintWriter(buf, true)); String expMessage = buf.toString(); try { buf.close(); } catch (IOException ex) { } return expMessage; }
|