On Wed, Mar 21, 2012 at 1:56 PM, smashernt <[email protected]> wrote: > Thanx Claus, knowing that I went ahead and gave the aggregator's children > their own doTry/doCatch and in the doCatch I direct it to my original > doCatch subroute. > ie: > from(STARTPOINT_URI) > .doTry() > .to("direct:split_it") > .doCatch(Throwable.class) > .to("direct:catch_all") > .doFinally() > .log("In Finally") > .end() > .end(); > ... > from("direct:aggregate_it") > .errorHandler(noErrorHandler()) > > .aggregate(header("groupid"),myAggStrategy).completionSize(header("groupSize")) > .doTry() > .to("direct:postprocess_it") > .doCatch() > .to("direct:catch_all") > .end() > .end() > > So that the new message that aggregate creates will eventually land in the > subroute that handles all my errors. > Side question, is the doTry/doCatch syntax : > doTry()...doCatch()..end()..end() or is it doTry()..doCatch()..end() ? From > reading the commit comments it appears like this flipped back and forth a > few times, I just want to make sure I have it right (for latest release). >
You only need the end() in the last doCatch or doFinally. You dont need an end on the doTry as it knows it ends when doCatch comes. > -- > View this message in context: > http://camel.465427.n5.nabble.com/doTry-doCatch-with-an-aggregate-tp5581510p5582798.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
