On this page https://jenkins.io/doc/book/pipeline/jenkinsfile/#syntax there is a Handling Failures section which might help you.
-- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/85db0f81-a28e-4b24-9f34-f02f42668e6a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
