title: Declarative pipeline: don't send post/failure notifications if build was aborted
body: <p>I'm trying to set up notifications on declarative pipeline failures as described here:<br>
  <a href="https://jenkins.io/doc/pipeline/tour/post/" rel="nofollow noreferrer">https://jenkins.io/doc/pipeline/tour/post/</a></p>
  
  <pre><code>post {
      failure {
          emailext (
              subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
              body: """&lt;p&gt;FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':&lt;/p&gt;
                  &lt;p&gt;Check console output at &amp;QUOT;&lt;a href='${env.BUILD_URL}'&gt;${env.JOB_NAME} [${env.BUILD_NUMBER}]&lt;/a&gt;&amp;QUOT;&lt;/p&gt;""",
              recipientProviders: [[$class: 'CulpritsRecipientProvider']]
          )
         }
      }
  }
  </code></pre>
  
  <p>Is there a way to not send emails if a build was aborted?</p>
  
  <p>In "old" scripted pipelines I caught the FlowInterruptedException to achieve this.</p>
  
  <pre><code>catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) {
      echo "the job was cancelled or aborted"
      currentBuild.result = 'ABORTED'    
  }
  </code></pre>