hmmm, this should work fine unless "proc3" is short circuiting the route. Here is a basic example of this that simply appends "-P3" and "-P4" to any message passed in...
from("direct:start") .onException(Exception.class) .handled(true) .process(new Processor() { public void process(Exchange exch) throws Exception { exch.getIn().setBody(exch.getIn().getBody(String.class) + "-P3"); } }) .process(new Processor() { public void process(Exchange exch) throws Exception { exch.getIn().setBody(exch.getIn().getBody(String.class) + "-P4"); } }) .end() .process(new Processor() { public void process(Exchange exch) throws Exception { throw new Exception("error"); } }); Jens wrote: > > Hi, > > I have a route that looks something like this: > > route > from ref="requestEp" > process ref="proc1" > process ref="proc2" > onException > exception java.lang.Exception > handled true > process ref="proc3" > process ref="proc4" > /onException > /route > > The exchange is using an InOut MEP, so I'm expecting a reply. > > When there is an exception it looks like only proc3 is ever called, proc4 > isn't. I tried switching the order of elements around some but it always > came down to this: only the first step of the onException block gets > called, and the result of this call is returned as my reply. Everything > thereafter in the onException block is effectively ignored. > > This is using Camel 2.6.0. > > Am I doing something wrong? > > Thanks, > Jens > ----- Ben O'Day IT Consultant -http://benoday.blogspot.com -- View this message in context: http://camel.465427.n5.nabble.com/Does-onException-not-support-multiple-statements-tp4381958p4382450.html Sent from the Camel - Users mailing list archive at Nabble.com.