diff src/org/tmatesoft/hg/repo/HgLookup.java @ 425:48f993aa2f41

FIXMEs: exceptions, javadoc
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 28 Mar 2012 18:39:29 +0200
parents 9c9c442b5f2e
children 12f668401613
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgLookup.java	Wed Mar 28 15:42:15 2012 +0200
+++ b/src/org/tmatesoft/hg/repo/HgLookup.java	Wed Mar 28 18:39:29 2012 +0200
@@ -80,9 +80,9 @@
 		}
 	}
 	
-	public HgBundle loadBundle(File location) throws HgRuntimeException/*FIXME need checked exception for can't find*/ {
+	public HgBundle loadBundle(File location) throws HgRepositoryNotFoundException {
 		if (location == null || !location.canRead()) {
-			throw new HgInvalidFileException(String.format("Can't read file %s", location == null ? null : location.getPath()), null, location);
+			throw new HgRepositoryNotFoundException(String.format("Can't read file %s", location)).setLocation(String.valueOf(location));
 		}
 		return new HgBundle(getContext(), new DataAccessProvider(getContext()), location).link();
 	}