Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-40161] Handle exceptions from StepExecution.onResume #187

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

jglick
Copy link
Member

@jglick jglick commented Dec 14, 2021

Preparation for https://issues.jenkins.io/browse/JENKINS-40161. Cannot safely add throws Exception to the method signature, or start letting implementations throw exceptions, until most users have updated to get this code, so might as well do it now rather than later; at least will already handle RuntimeException and Error.

Not really related to #178, which just moved this block of code around without changing what it did when called.

@car-roll car-roll merged commit 6a04bac into jenkinsci:master Dec 16, 2021
@jglick jglick deleted the onResume-JENKINS-40161 branch December 16, 2021 13:26
dwnusbaum added a commit to dwnusbaum/workflow-api-plugin that referenced this pull request Jan 14, 2022
try {
se.onResume();
} catch (Throwable x) {
se.getContext().onFailure(x);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this again, it might be better to use se.stop instead, although I'm not sure that it matters for any existing steps besides node. Compare to semi-related changes in jenkinsci/workflow-cps-plugin#780 and jenkinsci/workflow-durable-task-step-plugin#344.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants