Signed-off-by: Florian Koeberle <florianskarten@xxxxxx> --- .../jgit/errors/NoGitRepositoryFoundException.java | 28 ++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) create mode 100644 org.spearce.jgit/src/org/spearce/jgit/errors/NoGitRepositoryFoundException.java diff --git a/org.spearce.jgit/src/org/spearce/jgit/errors/NoGitRepositoryFoundException.java b/org.spearce.jgit/src/org/spearce/jgit/errors/NoGitRepositoryFoundException.java new file mode 100644 index 0000000..a0c6e83 --- /dev/null +++ b/org.spearce.jgit/src/org/spearce/jgit/errors/NoGitRepositoryFoundException.java @@ -0,0 +1,28 @@ +package org.spearce.jgit.errors; + +import java.io.File; + +/** + * No git repository could be found for a file or directory. + */ +public class NoGitRepositoryFoundException extends Exception { + private final File fileWeSearchedRepositoryFor; + + /** + * @param fileWeSearchedRepositoryFor + * the file for which a repository was searched. + */ + public NoGitRepositoryFoundException(final File fileWeSearchedRepositoryFor) { + super(String.format("No repository found for file '%s'", + fileWeSearchedRepositoryFor)); + this.fileWeSearchedRepositoryFor = fileWeSearchedRepositoryFor; + } + + /** + * @return the file searched for. + */ + public File getFileWeSearchedRepositoryFor() { + return fileWeSearchedRepositoryFor; + } + +} -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html