Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #632 from zanata/smtp-include-exception
Browse files Browse the repository at this point in the history
Include original exception when SMTP send fails
  • Loading branch information
seanf committed Nov 11, 2014
2 parents 1cbf945 + d5bf19f commit a2efbb1
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -109,7 +109,7 @@ public void sendMessage(EmailStrategy strategy,
} catch (MessagingException e) {
Throwable rootCause = Throwables.getRootCause(e);
if (rootCause.getClass().equals(ConnectException.class) && rootCause.getMessage().equals("Connection refused")) {
throw new RuntimeException("The system failed to connect to mail service. Please contact the administrator!");
throw new RuntimeException("The system failed to connect to mail service. Please contact the administrator!", e);
}
throw new RuntimeException(e);
}
Expand Down

0 comments on commit a2efbb1

Please sign in to comment.