try{...} catch (Exception e) {
e.printStackTrace();
rspCode = String.valueOf(BaseException.RSP_SYS_ERROR_CODE);
try {
// TODO 发送邮件预警
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw, true));
String str = sw.toString();
String text = "账户: " + account + ", 代码: " + rspCode + "<br> 信息: " + str;
emailService.sendBatchMail(MailUtil.mailto, "warning", text, "登录失败预警");
} catch (Exception e2) {
e2.printStackTrace();
}
} finally { ...}
[img]http://dl2.iteye.com/upload/attachment/0092/0723/641df484-e468-3ca8-ab4a-4258698aea72.jpg[/img]