Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 33614 invoked from network); 14 Oct 2010 03:42:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Oct 2010 03:42:05 -0000 Received: (qmail 6907 invoked by uid 500); 14 Oct 2010 03:42:05 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 6831 invoked by uid 500); 14 Oct 2010 03:42:04 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 6818 invoked by uid 500); 14 Oct 2010 03:42:04 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 6815 invoked by uid 99); 14 Oct 2010 03:42:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 03:42:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 03:42:02 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9E3fePK029656 for ; Thu, 14 Oct 2010 03:41:40 GMT Message-ID: <26395591.56601287027700394.JavaMail.jira@thor> Date: Wed, 13 Oct 2010 23:41:40 -0400 (EDT) From: "Hadrian Zbarcea (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-1823) doCatch(Predicate) In-Reply-To: <67675786.1247330854933.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62569#action_62569 ] Hadrian Zbarcea commented on CAMEL-1823: ---------------------------------------- @Johan, I think you're on the right track, but I am not sure I like the internal exception and I'd try to avoid it if possible. The reason is that the predicate does not have exception semantics. Interesting hack nevertheless. > doCatch(Predicate) > ------------------ > > Key: CAMEL-1823 > URL: https://issues.apache.org/activemq/browse/CAMEL-1823 > Project: Apache Camel > Issue Type: New Feature > Components: camel-core > Reporter: Claus Ibsen > Fix For: Future > > > As someone suggested on the user forum. > Letting {{doCatch}} be able to catch and react to a predicate as well. Currently it *only* reacts when an exception has been thrown. > Letting it react to predicates as well will really set it high over its Java counter part. > {code} > doTry() > .beanRef("myBean") > .to("activemq:queue:foo") > .doCatch(body().isNull()) > .to("log:foo?level=WARN") > .end() > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.