Just a quick note, the global onException only works inside of route builder not the whole camel context.
-- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 10, 2014 at 9:17:59 PM, Stephan Burkard ([email protected]) wrote: > 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 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. > > >
