Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41944

Unable to understand when AbortError is created by user`s action like pressing button Stop

    XMLWordPrintable

Details

    Description

      This doesn't help and actually looks like a veeery huge hack:

      try {
              sh "bash do_magic.sh"
              do_another_magic()
      } catch (hudson.AbortException e) {
              if (e.getMessage().contains('script returned exit code 143')) {
                       echo "aborted by user"
                       throw e
              } else {
                       echo "aborted by error, continuing next stage"
              }
      }
      

      Attachments

        Issue Links

          Activity

            kamikaze Oleg Korsak created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Component/s workflow-job-plugin [ 21716 ]
            Component/s pipeline [ 21692 ]
            jglick Jesse Glick made changes -
            Component/s workflow-durable-task-step-plugin [ 21715 ]
            Component/s workflow-job-plugin [ 21716 ]
            jglick Jesse Glick made changes -
            Link This issue duplicates JENKINS-28822 [ JENKINS-28822 ]
            jglick Jesse Glick made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Resolved [ 5 ]

            People

              Unassigned Unassigned
              kamikaze Oleg Korsak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: