diff src/org/tmatesoft/hg/core/HgStatusCommand.java @ 215:41a778e3fd31

Issue 5: Facilities for progress and cancellation. More specific exceptions. Exceptions from callbacks as RuntimeException
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 17 May 2011 00:56:54 +0200
parents d51f1c6aaa28
children 1ec6b327a6ac
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgStatusCommand.java	Mon May 16 21:10:36 2011 +0200
+++ b/src/org/tmatesoft/hg/core/HgStatusCommand.java	Tue May 17 00:56:54 2011 +0200
@@ -21,6 +21,7 @@
 import static org.tmatesoft.hg.repo.HgRepository.*;
 
 import java.util.ConcurrentModificationException;
+import java.util.concurrent.CancellationException;
 
 import org.tmatesoft.hg.internal.ChangelogHelper;
 import org.tmatesoft.hg.repo.HgRepository;
@@ -36,7 +37,7 @@
  * @author Artem Tikhomirov
  * @author TMate Software Ltd.
  */
-public class HgStatusCommand {
+public class HgStatusCommand extends HgAbstractCommand<HgStatusCommand> {
 	private final HgRepository repo;
 
 	private int startRevision = TIP;
@@ -161,7 +162,7 @@
 	 * @throws IllegalArgumentException if handler is <code>null</code>
 	 * @throws ConcurrentModificationException if this command already runs (i.e. being used from another thread)
 	 */
-	public void execute(Handler statusHandler) {
+	public void execute(Handler statusHandler) throws CancellationException, HgCallbackTargetException {
 		if (statusHandler == null) {
 			throw new IllegalArgumentException();
 		}