diff src/org/tmatesoft/hg/core/HgInvalidControlFileException.java @ 396:0ae53c32ecef

Straighten out exceptions thrown when file access failed - three is too much
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 23 Feb 2012 01:06:24 +0100
parents f52ca9530774
children
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgInvalidControlFileException.java	Wed Feb 22 16:54:34 2012 +0100
+++ b/src/org/tmatesoft/hg/core/HgInvalidControlFileException.java	Thu Feb 23 01:06:24 2012 +0100
@@ -19,12 +19,15 @@
 import java.io.File;
 
 import org.tmatesoft.hg.internal.Experimental;
+import org.tmatesoft.hg.util.Path;
 
 /**
  * WORK IN PROGRESS
  * 
  * Subclass of {@link HgInvalidFileException} to indicate failure to deal with one of <b>Mercurial</b> control files 
  * (most likely those under .hg/, but also those residing in the repository, with special meaning to the Mercurial, like .hgtags or .hgignore)
+ * 
+ * XXX Perhaps, HgInvalidRevlogException?
  * @author Artem Tikhomirov
  * @author TMate Software Ltd.
  */
@@ -44,13 +47,16 @@
 	
 	@Override
 	public HgInvalidControlFileException setRevision(Nodeid r) {
-		super.setRevision(r);
-		return this;
+		return (HgInvalidControlFileException) super.setRevision(r);
 	}
 
 	@Override
-	public HgException setRevisionIndex(int rev) {
-		super.setRevisionIndex(rev);
-		return this;
+	public HgInvalidControlFileException setRevisionIndex(int rev) {
+		return (HgInvalidControlFileException) super.setRevisionIndex(rev);
+	}
+	
+	@Override
+	public HgInvalidControlFileException setFileName(Path name) {
+		return (HgInvalidControlFileException) super.setFileName(name);
 	}
 }