From 4bc6eb8a70281b30e40ebe2fb12927ce2d2640df Mon Sep 17 00:00:00 2001 From: Ivan Frade Date: Thu, 6 Jun 2024 12:01:04 -0700 Subject: [PATCH] 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 b41187429359cf9830fd34368d28a454653e187d) --- org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java index 3aaef387f9..9979664ceb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java @@ -255,7 +255,7 @@ public class RepoCommand extends GitCommand { @SuppressWarnings("serial") static class ManifestErrorException extends GitAPIException { ManifestErrorException(Throwable cause) { - super(RepoText.get().invalidManifest, cause); + super(RepoText.get().invalidManifest + " " + cause.getMessage(), cause); } } -- 2.39.5