JAMES-2242 Avoid swallowing exceptions in bouncer

Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/b4839108
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/b4839108
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/b4839108

Branch: refs/heads/master
Commit: b483910843d7cf8f79c711e9928a6b39741252dc
Parents: 0b4923b
Author: benwa <btell...@linagora.com>
Authored: Wed Nov 29 14:25:47 2017 +0700
Committer: Antoine Duprat <adup...@linagora.com>
Committed: Mon Dec 4 14:42:16 2017 +0100

----------------------------------------------------------------------
 .../apache/james/transport/mailets/remoteDelivery/Bouncer.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/b4839108/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Bouncer.java
----------------------------------------------------------------------
diff --git 
a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Bouncer.java
 
b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Bouncer.java
index 8cca867..05a302b 100644
--- 
a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Bouncer.java
+++ 
b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Bouncer.java
@@ -28,8 +28,8 @@ import java.net.UnknownHostException;
 import javax.mail.MessagingException;
 import javax.mail.SendFailedException;
 
-import org.apache.mailet.Mail;
 import org.apache.james.core.MailAddress;
+import org.apache.mailet.Mail;
 import org.apache.mailet.MailetContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -70,9 +70,9 @@ public class Bouncer {
         try {
             mailetContext.bounce(mail, explanationText(mail, ex));
         } catch (MessagingException me) {
-            LOGGER.warn("Encountered unexpected messaging exception while 
bouncing message: {}", me.getMessage());
+            LOGGER.warn("Encountered unexpected messaging exception while 
bouncing message", me);
         } catch (Exception e) {
-            LOGGER.warn("Encountered unexpected exception while bouncing 
message: {}", e.getMessage());
+            LOGGER.warn("Encountered unexpected exception while bouncing 
message", e);
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to