diff src/org/tmatesoft/hg/repo/HgDataFile.java @ 322:d68dcb3b5f49

Propagate command's CancelSupport to low-level API. CancelSupport from context got priority over one from command
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 30 Sep 2011 08:00:04 +0200
parents 09628675bcee
children 4c7e3ba67213
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgDataFile.java	Fri Sep 30 07:59:22 2011 +0200
+++ b/src/org/tmatesoft/hg/repo/HgDataFile.java	Fri Sep 30 08:00:04 2011 +0200
@@ -615,5 +615,15 @@
 			}
 			return lastEntryStart;
 		}
+
+		@Override
+		public void checkFailed() throws HgException, IOException, CancelledException {
+			super.checkFailed();
+			if (delegate instanceof ErrorHandlingInspector) {
+				// XXX need to add ErrorDestination and pass it around (much like CancelSupport get passed)
+				// so that delegate would be able report its failures directly to caller without this hack
+				((ErrorHandlingInspector) delegate).checkFailed();
+			}
+		}
 	}
 }