Camel java dsl: try/catch+stop = finally is not evaluated
I'm thinking to stop execution in case of exception, but I do want to perform some logging in finally block. The .stop() definition looks like does what I need but it stops "finally" definition as well. https://github.com/vasilievip/camel-spring-boot/blob/master/src/main/java/cameltest/CamelConfiguration.java#L35 Is this expected behavior? Am I missing something? Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Camel-java-dsl-try-catch-stop-finally-is-not-evaluated-tp5762683.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel java dsl: try/catch+stop = finally is not evaluated
stop() stops the route so i thinks in my opinion this is expected behavior. What happens if you remove stop() from doCatch() and put it at the end of the doFinally() ? On 13/02/2015 10:42, vasilievip wrote: I'm thinking to stop execution in case of exception, but I do want to perform some logging in finally block. The .stop() definition looks like does what I need but it stops "finally" definition as well. https://github.com/vasilievip/camel-spring-boot/blob/master/src/main/java/cameltest/CamelConfiguration.java#L35 Is this expected behavior? Am I missing something? Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Camel-java-dsl-try-catch-stop-finally-is-not-evaluated-tp5762683.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel java dsl: try/catch+stop = finally is not evaluated
Hi Yes a stop is a hard stop, doFinally was intended about an exception was thrown, but you want to call some logic. It may further complicate routing engine if a stop is not a stop but should continue under special use-cases. On Fri, Feb 13, 2015 at 10:42 AM, vasilievip wrote: > I'm thinking to stop execution in case of exception, but I do want to perform > some logging in finally block. The .stop() definition looks like does what I > need but it stops "finally" definition as well. > https://github.com/vasilievip/camel-spring-boot/blob/master/src/main/java/cameltest/CamelConfiguration.java#L35 > > Is this expected behavior? Am I missing something? > Thanks > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-java-dsl-try-catch-stop-finally-is-not-evaluated-tp5762683.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/