Skip to content
Permalink
Browse files
[fix JENKINS-20531], catch GitException during fetch, throw AbortExce…
…ption

The AbortException is already thrown from another area of the same
method, so throwing the AbortException is likely no worse than the
existing AbortException which is thrown (instead of GitException).
  • Loading branch information
daspilker authored and MarkEWaite committed Oct 29, 2014
1 parent d4dda4b commit b6174a1ec3697358435eb691a76f0304b7a9f0ea
Showing 1 changed file with 6 additions and 1 deletion.
@@ -893,7 +893,12 @@ private void retrieveChanges(AbstractBuild build, GitClient git, BuildListener l
}

for (RemoteConfig remoteRepository : repos) {
fetchFrom(git, listener, remoteRepository);
try {
fetchFrom(git, listener, remoteRepository);
} catch (GitException ex) {
ex.printStackTrace(listener.error("Error fetching changes from repo '%s'", remoteRepository.getName()));
throw new AbortException();
}
}
}

0 comments on commit b6174a1

Please sign in to comment.