diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java index f3baafb0b..b601d80bc 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java @@ -45,6 +45,7 @@ package org.eclipse.jgit.pgm; import java.io.File; +import java.io.IOException; import java.text.MessageFormat; import org.eclipse.jgit.errors.RepositoryNotFoundException; @@ -66,7 +67,7 @@ class ReceivePack extends TextBuiltin { /** {@inheritDoc} */ @Override - protected void run() throws Exception { + protected void run() { final org.eclipse.jgit.transport.ReceivePack rp; try { @@ -75,9 +76,15 @@ class ReceivePack extends TextBuiltin { } catch (RepositoryNotFoundException notFound) { throw die(MessageFormat.format(CLIText.get().notAGitRepository, dstGitdir.getPath())); + } catch (IOException e) { + throw die(e.getMessage(), e); } rp = new org.eclipse.jgit.transport.ReceivePack(db); - rp.receive(ins, outs, errs); + try { + rp.receive(ins, outs, errs); + } catch (IOException e) { + throw die(e.getMessage(), e); + } } }