[
https://issues.apache.org/jira/browse/CAMEL-17897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-17897.
---------------------------------
Fix Version/s: 3.17.0
Resolution: Fixed
Thanks for reporting and the PR
> camel-exec fail exit code
> -------------------------
>
> Key: CAMEL-17897
> URL: https://issues.apache.org/jira/browse/CAMEL-17897
> Project: Camel
> Issue Type: New Feature
> Components: camel-exec
> Reporter: Stephan Balmer
> Priority: Minor
> Fix For: 3.17.0
>
>
> The camel-exec component will log an error when an executed command exited
> with nonzero exit-code. But if I want the route to abort at that point, I
> need to add an extra check:
> {code:java}
> <choice>
> <when>
> <simple>
> ${headers.CamelExecExitValue} != 0
> </simple>
> <throwException exceptionType="java.lang.RuntimeException"
> message="command failed"/>
> </when>
> </choice> {code}
> It would be useful to let the exec component generate an exception when the
> command fails, so that this check doesn't need to be performed.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)