comparison 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
comparison
equal deleted inserted replaced
321:ac38e75c9e8e 322:d68dcb3b5f49
613 if (data.isEmpty() || !byteOne) { 613 if (data.isEmpty() || !byteOne) {
614 throw new HgDataStreamException(fname, "Metadata is not closed properly", null); 614 throw new HgDataStreamException(fname, "Metadata is not closed properly", null);
615 } 615 }
616 return lastEntryStart; 616 return lastEntryStart;
617 } 617 }
618
619 @Override
620 public void checkFailed() throws HgException, IOException, CancelledException {
621 super.checkFailed();
622 if (delegate instanceof ErrorHandlingInspector) {
623 // XXX need to add ErrorDestination and pass it around (much like CancelSupport get passed)
624 // so that delegate would be able report its failures directly to caller without this hack
625 ((ErrorHandlingInspector) delegate).checkFailed();
626 }
627 }
618 } 628 }
619 } 629 }