diff src/org/tmatesoft/hg/internal/Internals.java @ 425:48f993aa2f41

FIXMEs: exceptions, javadoc
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 28 Mar 2012 18:39:29 +0200
parents fdd7d756dea0
children 909306e412e2
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/Internals.java	Wed Mar 28 15:42:15 2012 +0200
+++ b/src/org/tmatesoft/hg/internal/Internals.java	Wed Mar 28 18:39:29 2012 +0200
@@ -32,6 +32,7 @@
 
 import org.tmatesoft.hg.core.SessionContext;
 import org.tmatesoft.hg.repo.HgInternals;
+import org.tmatesoft.hg.repo.HgInvalidControlFileException;
 import org.tmatesoft.hg.repo.HgRepoConfig.ExtensionsSection;
 import org.tmatesoft.hg.repo.HgRepository;
 import org.tmatesoft.hg.util.PathRewrite;
@@ -80,18 +81,17 @@
 	private final boolean shallCacheRevlogsInRepo;
 
 	public Internals(SessionContext ctx) {
-		this.sessionContext = ctx;
+		sessionContext = ctx;
 		isCaseSensitiveFileSystem = !runningOnWindows();
 		Object p = ctx.getProperty(CFG_PROPERTY_REVLOG_STREAM_CACHE, true);
 		shallCacheRevlogsInRepo = p instanceof Boolean ? ((Boolean) p).booleanValue() : Boolean.parseBoolean(String.valueOf(p));
 	}
 	
-	public void parseRequires(HgRepository hgRepo, File requiresFile) {
+	public void parseRequires(HgRepository hgRepo, File requiresFile) throws HgInvalidControlFileException {
 		try {
 			new RequiresFile().parse(this, requiresFile);
 		} catch (IOException ex) {
-			// FIXME EXCEPTIONS not quite sure error reading requires file shall be silently logged only.
-			HgInternals.getContext(hgRepo).getLog().error(getClass(), ex, null);
+			throw new HgInvalidControlFileException("Parse failed", ex, requiresFile);
 		}
 	}