Hi Yeah you can do that though its not as often seen in use.
See this FAQ https://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html When using java dsl you may need to use endXXX to make the compiler happy. On Mon, Mar 10, 2014 at 4:46 PM, Jose <[email protected]> wrote: > Is it possible to have nested doTry-doCatch blocks? If so, how the inner > block should be ended? > > For example: > > .doTry() > .... > .doTry() > .... > .doCatch() > .... > ..end() > *.doCatch()* > .... > .end() > > This code does not compile. I get "Compilation error The method > doCatch(Class<Exception>) is undefined for the type > ProcessorDefinition<capture#1-of ?>" in the second "doCatch". > > Thank you very much. > > Jose > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Nested-doTry-doCatch-blocks-tp5748561.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io
