camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: try-catch conflict with default-error-handler
Date Fri, 26 Mar 2010 07:11:11 GMT
On Fri, Mar 26, 2010 at 7:30 AM, ext2 <xuhb@tongtech.com> wrote:
> Sorry, I forget to say, this is running on camel 2.2;
>
> I have checked the camel's document and source-code; the camel-document say
> " try-catch will disable the error-handler"; but while I checking the
> source-code of camel , it only disable  error-handlers of node (which is
> conjunction with doTry pattern).
>
>  In the following example, only <filter> processor is conjunction with
> <doTry>. So only filter processor's  error-handler is disabled. But
> error-handlers of  other processor which defined inside filter is not
> disabled.
>
> So the catch-clause is not invoked. Is it a bug?
>

I have created a ticket to look into it
https://issues.apache.org/activemq/browse/CAMEL-2577


> ---------------------------------------------------------------------------
> Follow route use a default-error-handler for the route, and also defined  a
> custom exception handle logic using try-catch-pattern.
>
> But if the "myProcessRaiseError" raised exception the catch-clause cannot be
> invoked; Why? Is it camel's bug?
>
>
> <route>
>      <from uri="ws:... "/>
>         <bean ...>
>        <doTry>
>         <filter>
>                <simple>${body} == 'firstChoice'</simple>
>                      <bean ref="myProcess" />
>                      <bean ref="myProcessRaiseError"/>
>              </filter>
>                <doCatch>
>                        ..some error handler...
>                </doCatch>
>        </doTry>
>     <process ...>
> </route>
>
>
>
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message