Yes you would need to disable error handling on that sub route. On Wed, Mar 30, 2011 at 4:03 PM, Charles Moulliard <[email protected]> wrote: > Hi, > > To be able to process in a camel parent route an exception throwed in > a sub route, a noErrorHandler must be defined in the subroute. Is > there an alternative for doing that without defining a NoErrorHandler > into the second camel route ? > > > public void configure() throws Exception { > > from("direct:start") // route parent > > .onException(IllegalArgumentException.class).continued(true).logContinued(true).end() > .to("mock:start") > .to("direct:b") > .to("direct:c") > .to("mock:result"); > > from("direct:b") // sub route > .errorHandler(noErrorHandler()) > .to("mock:b") > .throwException(new IllegalArgumentException("Forced")); > > from("direct:c") > .to("mock:c"); > > Regards, > > Charles Moulliard > > Sr. Principal Solution Architect - FuseSource > Apache Committer > > Blog : http://cmoulliard.blogspot.com > Twitter : http://twitter.com/cmoulliard > Linkedin : http://www.linkedin.com/in/charlesmoulliard > Skype: cmoulliard >
-- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
