git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[JGIT PATCH 3/5] Add ConfigInvalidException constructor to take Throwable

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 29, 2009, 15:50 UTC
Message-ID
<1248882627-7285-4-git-send-email-spearce@spearce.org>
In-Reply-To
<1248882627-7285-3-git-send-email-spearce@spearce.org>

This permits applications to wrap a ConfigInvalidException with more detail before throwing it to the caller.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 .../jgit/errors/ConfigInvalidException.java        |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/errors/ConfigInvalidException.java b/org.spearce.jgit/src/org/spearce/jgit/errors/ConfigInvalidException.java
index 6e861fd..28c87a5 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/errors/ConfigInvalidException.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/errors/ConfigInvalidException.java
@@ -50,4 +50,16 @@
 	public ConfigInvalidException(final String message) {
 		super(message);
 	}
+
+	/**
+	 * Construct an invalid configuration error.
+	 *
+	 * @param message
+	 *            why the configuration is invalid.
+	 * @param cause
+	 *            root cause of the error.
+	 */
+	public ConfigInvalidException(final String message, final Throwable cause) {
+		super(message, cause);
+	}
 }
-- 
1.6.4.rc3.201.gd9d59
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 4 of 6 in “Some minor bug fixes”
  1. 0/5 Some minor bug fixesShawn O. Pearce, Jul 29, 2009
  2. 1/5 Don't dispose of RevFlag used to advertise objects in ReceivePackShawn O. Pearce, Jul 29, 2009
  3. 2/5 Allow RemoteConfig.getAllRemoteConfigs on any Config objectShawn O. Pearce, Jul 29, 2009
  4. 3/5 Add ConfigInvalidException constructor to take ThrowableShawn O. Pearce, Jul 29, 2009
  5. 4/5 Add no fallback constructor to FileBasedConfigShawn O. Pearce, Jul 29, 2009
  6. 5/5 Include the file path when FileBasedConfig.load throws an exceptionShawn O. Pearce, Jul 29, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.