diff src/org/tmatesoft/hg/repo/HgManifest.java @ 354:5f9073eabf06

Propagate errors with exceptions up to a end client
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 01 Dec 2011 05:21:40 +0100
parents d42a45a2c9d6
children 189dc6dc1c3e
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgManifest.java	Thu Dec 01 03:05:28 2011 +0100
+++ b/src/org/tmatesoft/hg/repo/HgManifest.java	Thu Dec 01 05:21:40 2011 +0100
@@ -26,6 +26,7 @@
 import java.util.Map;
 
 import org.tmatesoft.hg.core.HgBadStateException;
+import org.tmatesoft.hg.core.HgInvalidControlFileException;
 import org.tmatesoft.hg.core.Nodeid;
 import org.tmatesoft.hg.internal.DataAccess;
 import org.tmatesoft.hg.internal.DigestHelper;
@@ -474,7 +475,12 @@
 				Nodeid manifest = repo.getChangelog().range(u, u).get(0).manifest();
 				// FIXME calculate those missing effectively (e.g. cache and sort nodeids to speed lookup
 				// right away in the #next (may refactor ParentWalker's sequential and sorted into dedicated helper and reuse here)
-				changelog2manifest[u] = repo.getManifest().getLocalRevision(manifest);
+				try {
+					changelog2manifest[u] = repo.getManifest().getLocalRevision(manifest);
+				} catch (HgInvalidControlFileException ex) {
+					// FIXME need to propagate the error up to client  
+					repo.getContext().getLog().error(getClass(), ex, null);
+				}
 			}
 		}
 	}