You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ad...@apache.org on 2017/11/30 14:22:24 UTC

[4/9] james-project git commit: MAILBOX-321 Improve error handling: don't swallow stacktrace

MAILBOX-321 Improve error handling: don't swallow stacktrace


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

Branch: refs/heads/master
Commit: c034bc4d91142a3b1dff31a36f5f2f87d1f0253d
Parents: c2b04bc
Author: benwa <bt...@linagora.com>
Authored: Tue Nov 28 10:17:55 2017 +0700
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Thu Nov 30 14:54:09 2017 +0100

----------------------------------------------------------------------
 .../james/mailbox/store/mail/model/impl/MessageParser.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/c034bc4d/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/MessageParser.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/MessageParser.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/MessageParser.java
index 362f5ac..785c894 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/MessageParser.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/MessageParser.java
@@ -122,9 +122,9 @@ public class MessageParser {
             try {
                 return Stream.of(retrieveAttachment(entity));
             } catch (IllegalStateException e) {
-                LOGGER.error("The attachment is not well-formed: " + e.getCause());
+                LOGGER.error("The attachment is not well-formed", e);
             } catch (IOException e) {
-                LOGGER.error("There is error on retrieve attachment: " + e.getCause());
+                LOGGER.error("There is an error when retrieving attachment", e);
             }
         }
         return Stream.empty();


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