Here's a trivial example of a general problem:
I have an always block, but I can't actually guarantee that all steps in that always block will all always attempt to run.
In Scripted Pipeline I could wrap each of these in a try-catch, but I can't do that in Declarative.
I can reorder these steps to put the ones that I know won't fail earlier, but what about the email step? I want that to be last, so it gets the proper build status in the email.
Andrew Bayer suggested a catchError block. But depending on which step fails, that doesn't get the right behavior either. I want each step in the always to run exactly once no matter the build status. If the second step fails the catchError can't tell which one failed and not to run the first step again.
Logically what I would expect to work:
However, I'm not allowed to have more than one always block.