Skip to content

Commit

Permalink
Merge pull request #325 from MCMicS/bug/322
Browse files Browse the repository at this point in the history
closes #322 Nullpointer if Jenkins if not running
  • Loading branch information
MCMicS authored Sep 26, 2021
2 parents 0fc3c62 + 554d5d6 commit 7b06d08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public void run(@NotNull ProgressIndicator progressIndicator) {
jenkinsTask.run(requestManager);
} catch (JenkinsPluginRuntimeException jenkinsPluginRuntimeException) {
handleJenkinsPluginException(jenkinsPluginRuntimeException);
throw jenkinsPluginRuntimeException;
}
}

Expand Down Expand Up @@ -68,7 +69,9 @@ public void onSuccess() {
@Override
public void onThrowable(@NotNull Throwable error) {
try {
super.onThrowable(error);
if (!(error instanceof JenkinsPluginRuntimeException)) {
super.onThrowable(error);
}
jenkinsTask.onThrowable(error);
} catch (JenkinsPluginRuntimeException jenkinsPluginRuntimeException) {
handleJenkinsPluginException(jenkinsPluginRuntimeException);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public void run(@NotNull RequestManagerInterface requestManager) {
requestManager.authenticate(settings, jenkinsSettings);
jenkinsWorkspace = requestManager.loadJenkinsWorkspace(settings);
} catch (Exception ex) {
publisher.loginFailed(ex);
publisher.loginCancelled();
throw ex;
}
}

Expand Down

0 comments on commit 7b06d08

Please sign in to comment.