camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Babak Vahdat <babak.vah...@swissonline.ch>
Subject Re: Dynamic router EIP and Eceptions
Date Thu, 01 Mar 2012 09:35:20 GMT
Hi

Yes, using the onException clause you could make use of continued(true).
Also take a look at [1] for the semantics of "handled" & "continued" DSL
elements.

One possible way would be:

                onException(MyIgnoredException.class).process(new
Processor() {
                    @Override
                    public void process(Exchange exchange) throws Exception
{
                       Exception exception =
exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class);                       
                       String message = exception.getMessage();
                      
                      // now do whatever you want with the exception
message...
                    }
                }).continued(true);


[1] http://camel.apache.org/exception-clause.html

Babak

--
View this message in context: http://camel.465427.n5.nabble.com/Dynamic-router-EIP-and-Eceptions-tp5526894p5527400.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message