aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-01-20 21:19:53 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2019-01-20 22:18:41 +0100
commit7a64771b9e761ef37c8ab0a29ffe03d29b688ec4 (patch)
tree62f07ea5f1f424bb452ad281b33925f27eaf6aa9 /org.eclipse.jgit.pgm
parente65497ad0913089d28c67ecd9dfaeede6725e84a (diff)
downloadjgit-7a64771b9e761ef37c8ab0a29ffe03d29b688ec4.tar.gz
jgit-7a64771b9e761ef37c8ab0a29ffe03d29b688ec4.zip
pgm: Handle IOException in Fetch command
This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: If8be68621c7135435cd067ef638460b175786b1b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java
index 846879388e..f29740d8a0 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java
@@ -137,7 +137,7 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback {
/** {@inheritDoc} */
@Override
- protected void run() throws Exception {
+ protected void run() {
try (Git git = new Git(db)) {
FetchCommand fetch = git.fetch();
if (fsck != null)
@@ -169,7 +169,7 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback {
return;
showFetchResult(result);
- } catch (GitAPIException e) {
+ } catch (GitAPIException | IOException e) {
throw die(e.getMessage(), e);
}
}