Skip to content
Permalink
Browse files
Add AbortException comment for retry
Attempt to avoid losing the fix for JENKINS-20531 in future
changes. No easy way to create a test which asserts an error is thrown
when fetch() throws an exception, so insert the comment as a weaker
defense against regression.
  • Loading branch information
MarkEWaite committed Oct 29, 2014
1 parent b6174a1 commit c3a4092ed6de82224575fea0cf12a57136643352
Showing 1 changed file with 2 additions and 0 deletions.
@@ -896,6 +896,8 @@ private void retrieveChanges(AbstractBuild build, GitClient git, BuildListener l
try {
fetchFrom(git, listener, remoteRepository);
} catch (GitException ex) {
/* Allow retry by throwing AbortException instead of
* GitException. See JENKINS-20531. */
ex.printStackTrace(listener.error("Error fetching changes from repo '%s'", remoteRepository.getName()));
throw new AbortException();
}

0 comments on commit c3a4092

Please sign in to comment.