diff options
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/errors')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/errors/TooLargePackException.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/TooLargePackException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/TooLargePackException.java index 5cf0f802c1..d54798541d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/TooLargePackException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/TooLargePackException.java @@ -43,17 +43,17 @@ package org.eclipse.jgit.errors; -import java.io.IOException; import java.text.MessageFormat; import org.eclipse.jgit.internal.JGitText; +import org.eclipse.jgit.transport.URIish; /** * Thrown when a pack exceeds a given size limit * * @since 3.3 */ -public class TooLargePackException extends IOException { +public class TooLargePackException extends TransportException { private static final long serialVersionUID = 1L; /** @@ -66,4 +66,17 @@ public class TooLargePackException extends IOException { super(MessageFormat.format(JGitText.get().receivePackTooLarge, Long.valueOf(packSizeLimit))); } + + /** + * Construct a too large pack exception. + * + * @param uri + * URI used for transport + * @param s + * message + * @since 4.0 + */ + public TooLargePackException(URIish uri, String s) { + super(uri.setPass(null) + ": " + s); //$NON-NLS-1$ + } } |