You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/07/26 12:56:00 UTC
[jira] [Updated] (CAMEL-18288) YAML DSL DoTry does not work
[ https://issues.apache.org/jira/browse/CAMEL-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-18288:
--------------------------------
Fix Version/s: 3.19.0
> YAML DSL DoTry does not work
> -----------------------------
>
> Key: CAMEL-18288
> URL: https://issues.apache.org/jira/browse/CAMEL-18288
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang, camel-yaml-dsl
> Affects Versions: 3.18.0
> Reporter: Marat Gubaidullin
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.19.0
>
>
> The following two routes expected to work the same way:
> {code:java}
> import org.apache.camel.builder.RouteBuilder;
> import org.apache.camel.model.language.GroovyExpression;
> public class Test extends RouteBuilder {
> @Override
> public void configure() throws Exception {
> from("timer:demo")
> .doTry()
> .setBody(new GroovyExpression("100/10"))
> .doCatch(ArithmeticException.class)
> .log("Exception")
> .doFinally()
> .log("${body}");
> }
> }
> {code}
> {code:java}
> - route:
> from:
> uri: timer:demo
> steps:
> - doTry:
> steps:
> - setBody:
> expression:
> groovy:
> expression: 1000 / 0
> doCatch:
> - steps:
> - log:
> message: Exception
> exception:
> - java.lang.ArithmeticException
> doFinally:
> steps:
> - log:
> message: ${body}
> {code}
> However Java version works fine, but YAML version does not catch exception and does not execute doFinally
--
This message was sent by Atlassian Jira
(v8.20.10#820010)