[ 
https://issues.apache.org/jira/browse/CAMEL-18042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17533723#comment-17533723
 ] 

Yasser Zamani commented on CAMEL-18042:
---------------------------------------

[~davsclaus] I accidentally (because of another app another route) realized 
that looks like in new versions of Camel, doTry doCatch needs *two* {{.end()}} 
s! (it doesn't match Camel docs). That being said, when I add another {{.end() 
// end catch}} before last {{.end()}} in the first route above, it starts 
working with {{{}.rollback(){}}}!!!

> doCatch of a rollback only executes one line after doCatch and prune the rest 
> of the route
> ------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-18042
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18042
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 3.16.0
>            Reporter: Yasser Zamani
>            Priority: Minor
>
> I have following route (simplified)
> {code:java}
>         
> from("quartz://MY_CTRL?cron=0+0/10+8-12+?+*+MON-FRI").routeId("MY_CTRL").
>                 transacted("PROPAGATION_NEVER").
> .
> .
> .
>                 doTry().
>                 to("direct:MY_CSV").
>                 doCatch(Throwable.class).
>                 log("CSV generation or upload failed. So delete azure blob").
>                 log("blahblahblah").
>                 end(); // end try
>         from("direct:MY_CSV").routeId("MY_CSV").
>                 transacted().
> .
> .
> .
>                 filter(body().isNotEqualTo(Boolean.TRUE)).
>                 rollback()
>                 stop().
>                 end().
> .
> .
> .
> {code}
> that doesn't print {{blahblahblah}}. When I replace {{rolback()}} with 
> {{throwException(new RuntimeException("Failed to upload"))}} it does.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to