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

Reply via email to