Mercurial > jhg
diff src/org/tmatesoft/hg/core/HgChangesetFileSneaker.java @ 423:9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 23 Mar 2012 22:51:18 +0100 |
parents | ccd7d25e5aea |
children | 31a89587eb04 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgChangesetFileSneaker.java Fri Mar 23 21:26:01 2012 +0100 +++ b/src/org/tmatesoft/hg/core/HgChangesetFileSneaker.java Fri Mar 23 22:51:18 2012 +0100 @@ -18,8 +18,11 @@ import org.tmatesoft.hg.internal.ManifestRevision; import org.tmatesoft.hg.repo.HgDataFile; +import org.tmatesoft.hg.repo.HgInvalidControlFileException; +import org.tmatesoft.hg.repo.HgInvalidStateException; import org.tmatesoft.hg.repo.HgManifest; import org.tmatesoft.hg.repo.HgRepository; +import org.tmatesoft.hg.repo.HgRuntimeException; import org.tmatesoft.hg.util.Path; import org.tmatesoft.hg.util.Status; @@ -145,7 +148,7 @@ extractRevFlags = cachedManifest.flags(file); } } - } catch (HgException ex) { + } catch (HgRuntimeException ex) { checkResult = new Status(Status.Kind.ERROR, phaseMsg, ex); return checkResult; } @@ -212,7 +215,7 @@ private void assertCheckRan() { if (checkResult == null) { - throw new HgBadStateException("Shall invoke #check(Path) first"); + throw new HgInvalidStateException("Shall invoke #check(Path) first"); } }