diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java index 26276718d..394083c85 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java @@ -45,6 +45,7 @@ package org.eclipse.jgit.pgm; import java.io.BufferedInputStream; +import java.io.IOException; import org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser; import org.eclipse.jgit.lib.ObjectInserter; @@ -62,7 +63,7 @@ class IndexPack extends TextBuiltin { /** {@inheritDoc} */ @Override - protected void run() throws Exception { + protected void run() { BufferedInputStream in = new BufferedInputStream(ins); try (ObjectInserter inserter = db.newObjectInserter()) { PackParser p = inserter.newPackParser(in); @@ -73,6 +74,8 @@ class IndexPack extends TextBuiltin { } p.parse(new TextProgressMonitor(errw)); inserter.flush(); + } catch (IOException e) { + throw die(e.getMessage(), e); } } }