title: Jenkins Pipeline Get Current Stage Status After Using catchError
body: <p>This is a follow-up to my earlier question:</p>
  
  <p><a href="https://stackoverflow.com/questions/48471101/set-a-stage-status-in-jenkins-pipelines/56975266#56975266">Set a stage status in Jenkins Pipelines</a></p>
  
  <p>It turns out I can keep a pipeline as SUCCESS but can mark an individual stage as UNSTABLE if I want via <code>catchError</code> like this:</p>
  
  <pre><code>node()
  {
      stage("Stage 1")
      {
          catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE')
          {
              sh 'exit 1'
          }
      }
  }
  </code></pre>
  
  <p>If I want to get the current status of the pipeline itself, I can use <code>currentBuild.getCurrentResult()</code> but I don't see a <code>currentStage</code> analog to this. </p>
  
  <p>I'm interested in trying out a pattern that might look something like this in my stages:</p>
  
  <pre><code>stage("1") {
      catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
          // do stuff
      }
      // perhaps more catchError() blocks
      if(currentStage.getCurrentResult() == "UNSTABLE") {
          // do something special if we're unstable
      }
  }
  </code></pre>
  
  <p>but that would fail because there's no <code>currentStage</code> available.</p>
  
  <p>So basically, <code>catchError()</code> is nice but I'd like to know how I can catch the status change to my stage if it gets changed... Does anyone know how you access the status of the current stage you're in from a pipeline?  </p>