-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins v2.32
Pipeline: Groovy 2.29 (current 2.30)
Jenkinsfile:
try { foo(); // no such method echo "after foo"; } catch (e) { echo "caught exception"; // throw e if you want } finally { echo "finally"; }
prints "finally", but should say "caught exception \n finally".
Variants: define method foo(), but foo() calls bar() which is not defined.
The catch works if you try something bad like "abc".toLong() (method not whitelisted), or a step fails (sh 'false'). Not sure what the difference is, though.
Just experienced the same issue in Jenkins v2.46.2
Thought it might be related to JENKINS-38630