Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.18.0
-
None
-
Unknown
Description
The following two routes expected to work the same way:
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}"); } }
- 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}
However Java version works fine, but YAML version does not catch exception and does not execute doFinally
Attachments
Issue Links
- fixes
-
CAMEL-18312 DoTry and DoCatch block does not work in YAML DSL
- Resolved