Skip to content
Snippets Groups Projects
Commit 4bc6eb8a authored by Ivan Frade's avatar Ivan Frade Committed by Matthias Sohn
Browse files

RepoCommand: Add error to ManifestErrorException

RepoCommand wraps errors in the manifest in a ManifestErrorException
with a fixed message ("Invalid manifest"). Callers like supermanifest
plugin cannot return a meaningful error to the client without digging
into the cause chain.

Add the actual error message to the ManifestErrorException, so callers
can rely on #getMessage() to see what happens.

Change-Id: I18be17fb5e4aaaf4f11ebd627580a91fe330eaca
(cherry picked from commit b4118742)
parent 784f0bae
No related branches found
No related tags found
No related merge requests found
......@@ -255,7 +255,7 @@ public RemoteFile readFileWithMode(String uri, String ref, String path)
@SuppressWarnings("serial")
static class ManifestErrorException extends GitAPIException {
ManifestErrorException(Throwable cause) {
super(RepoText.get().invalidManifest, cause);
super(RepoText.get().invalidManifest + " " + cause.getMessage(), cause);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment