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

Commit

Permalink
Include original exception when SMTP send fails
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Nov 10, 2014
1 parent 395a7d5 commit d5bf19f
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 d5bf19f

Please sign in to comment.