Mercurial > hg4j
diff src/org/tmatesoft/hg/internal/ConfigFile.java @ 628:6526d8adbc0f
Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 22 May 2013 15:52:31 +0200 |
parents | e1b29756f901 |
children |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/ConfigFile.java Tue May 21 20:17:33 2013 +0200 +++ b/src/org/tmatesoft/hg/internal/ConfigFile.java Wed May 22 15:52:31 2013 +0200 @@ -31,8 +31,8 @@ import java.util.List; import java.util.Map; +import org.tmatesoft.hg.core.HgIOException; import org.tmatesoft.hg.core.SessionContext; -import org.tmatesoft.hg.repo.HgInvalidFileException; import org.tmatesoft.hg.util.LogFacility; /** @@ -50,7 +50,7 @@ sessionContext = ctx; } - public void addLocation(File path) throws HgInvalidFileException { + public void addLocation(File path) throws HgIOException { read(path); } @@ -125,7 +125,7 @@ } } - private void read(File f) throws HgInvalidFileException { + private void read(File f) throws HgIOException { if (f == null || !f.canRead()) { return; } @@ -227,7 +227,7 @@ return true; } - public void go(File f, ConfigFile cfg) throws HgInvalidFileException { + public void go(File f, ConfigFile cfg) throws HgIOException { contextFile = f; LineReader lr = new LineReader(f, cfg.sessionContext.getLog()); lr.ignoreLineComments("#"); @@ -250,7 +250,7 @@ LogFacility lf = cfg.sessionContext.getLog(); lf.dump(ConfigFile.class, LogFacility.Severity.Debug, "Can't read file to include: %s", f); } - } catch (HgInvalidFileException ex) { + } catch (HgIOException ex) { LogFacility lf = cfg.sessionContext.getLog(); lf.dump(ConfigFile.class, LogFacility.Severity.Warn, "Can't include %s (%s)", f, includeValue); }