I expect that when a timeout is reached, the exception will be caught by the try-catch that surrounds the "timeout" step.
But actually, it is caught by the most inner try-catch.
My goal here is to set timeout to set of actions and if the timeout is reached, I want them all to stop. I also want to have more try-catch inside for handling other issues.
But the actual behavior is that when the timeout is reached, the most internal catch handles it instead of the try-catch that surrounds the timeout step.
This issue is similar to
JENKINS-39266. I do not understand why it was closed.
By the way, the
prints "null", which is also a problem.