[Minor] Catch throwable mail sending exceptions
This commit is contained in:
parent
7fc6c2d8c8
commit
2ae0389f2c
|
@ -67,7 +67,7 @@ public class SmtpMailHandler extends MailHandler {
|
|||
private void doSendMail(String subject, String text, String recipients) {
|
||||
try {
|
||||
SmtpMailer.getInstance().sendMail(subject, text, recipients);
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
logger.error("Failed to send mail \"" + subject + "\" to " + recipients, e);
|
||||
|
||||
if (hasComponent(OperationsLog.class)) {
|
||||
|
@ -84,7 +84,7 @@ public class SmtpMailHandler extends MailHandler {
|
|||
String type) {
|
||||
try {
|
||||
SmtpMailer.getInstance().sendMail(subject, text, recipients, attachment, fileName, type);
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
logger.error("Failed to send mail \"" + subject + "\" to " + recipients + " with attachment " + fileName,
|
||||
e);
|
||||
|
||||
|
|
Loading…
Reference in New Issue