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 <btell...@linagora.com> Authored: Tue Nov 28 10:17:55 2017 +0700 Committer: Antoine Duprat <adup...@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-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org