pgm: Handle GitAPIException 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: I043838143df7280351186ee1bcca4d1cc4832257 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
be2ae1e103
commit
fe52e2fb8e
|
@ -51,6 +51,7 @@
|
|||
|
||||
import org.eclipse.jgit.api.FetchCommand;
|
||||
import org.eclipse.jgit.api.Git;
|
||||
import org.eclipse.jgit.api.errors.GitAPIException;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.SubmoduleConfig.FetchRecurseSubmodulesMode;
|
||||
import org.eclipse.jgit.lib.TextProgressMonitor;
|
||||
|
@ -168,6 +169,8 @@ protected void run() throws Exception {
|
|||
return;
|
||||
|
||||
showFetchResult(result);
|
||||
} catch (GitAPIException e) {
|
||||
throw die(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue