Yes, if you define your onException globally. Currently you have defined it locally just for the pipeline.
See section "Scopes" at http://camel.apache.org/error-handler.html Stephan On Thu, Mar 6, 2014 at 12:30 PM, Jose <[email protected]> wrote: > Hi, > > I facing a problem catching exceptions when I use pipeline. > > I have a route like this: > > from("direct:x").pipeline("direct:y").process(processorA) > > The pipeline contains > onException(MyException.class).handled(true).process(....) > > The problem is when an exception is thrown in "processorA". That exception > is not being caught by the "onException" defined within the pipeline. > > I have tried to define "onException" as well on the calling route: > > onException(MyException.class).handled(true).process(...). > from("direct:x").pipeline("direct:y").process(processorA) > > That way it works but I would like to avoid adding this on every route. I > would like to define a global "onException" to handle both the exceptions > thrown within the pipeline and outside the pipeline. > > Is there any way to do that? > > Thank you. > > Jose > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Exception-propagation-with-onException-pipeline-tp5748383.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
