You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/11/25 13:15:33 UTC
camel git commit: CAMEL-10527: camel-mail - Option skipFailedMessage
should catch all exceptions
Repository: camel
Updated Branches:
refs/heads/camel-2.17.x 887627bd8 -> 9e4e70bc0
CAMEL-10527: camel-mail - Option skipFailedMessage should catch all exceptions
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9e4e70bc
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9e4e70bc
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9e4e70bc
Branch: refs/heads/camel-2.17.x
Commit: 9e4e70bc0b6c3b438b3232fce3e7fd5d2ffa5fa0
Parents: 887627b
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Nov 25 14:14:04 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 25 14:15:26 2016 +0100
----------------------------------------------------------------------
.../main/java/org/apache/camel/component/mail/MailConsumer.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/9e4e70bc/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
index 66da5ff..53c6bfc 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
@@ -287,7 +287,7 @@ public class MailConsumer extends ScheduledBatchPollingConsumer {
try {
Message msg = folder.getMessage(i);
msgs.add(msg);
- } catch (MessagingException e) {
+ } catch (Exception e) {
if (skipFailedMessage) {
LOG.debug("Skipping failed message at index " + i + " due " + e.getMessage(), e);
} else if (handleFailedMessage) {
@@ -367,7 +367,7 @@ public class MailConsumer extends ScheduledBatchPollingConsumer {
LOG.debug("Skipping message as it was flagged as deleted: {}", MailUtils.dumpMessage(message));
}
}
- } catch (MessagingException e) {
+ } catch (Exception e) {
if (skipFailedMessage) {
LOG.debug("Skipping failed message at index " + i + " due " + e.getMessage(), e);
} else if (handleFailedMessage) {