Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17897

camel-exec fail exit code

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.17.0
    • camel-exec
    • None
    • Unknown

    Description

      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:

              <choice>
                  <when>
                      <simple>
                          ${headers.CamelExecExitValue} != 0
                      </simple>
                      <throwException exceptionType="java.lang.RuntimeException" message="command failed"/>
                  </when>
              </choice> 

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sbalmer Stephan Balmer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: