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: I087b3e510682c68cae74c069b10050c7acb48a29
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
package org.eclipse.jgit.pgm;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/** {@inheritDoc} */
@Override
- protected void run() throws Exception {
+ protected void run() {
try (TreeWalk walk = new TreeWalk(db)) {
walk.setRecursive(recursive);
for (AbstractTreeIterator i : trees)
outw.print(walk.getPathString());
outw.println();
}
+ } catch (IOException e) {
+ throw die(e.getMessage(), e);
}
}
}