diff src/org/tmatesoft/hg/repo/ext/MqManager.java @ 628:6526d8adbc0f

Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 22 May 2013 15:52:31 +0200
parents 507602cb4fb3
children
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/ext/MqManager.java	Tue May 21 20:17:33 2013 +0200
+++ b/src/org/tmatesoft/hg/repo/ext/MqManager.java	Wed May 22 15:52:31 2013 +0200
@@ -27,11 +27,11 @@
 import java.util.List;
 import java.util.Map;
 
+import org.tmatesoft.hg.core.HgIOException;
 import org.tmatesoft.hg.core.Nodeid;
 import org.tmatesoft.hg.internal.Internals;
 import org.tmatesoft.hg.internal.LineReader;
 import org.tmatesoft.hg.repo.HgInvalidControlFileException;
-import org.tmatesoft.hg.repo.HgInvalidFileException;
 import org.tmatesoft.hg.util.LogFacility;
 import org.tmatesoft.hg.util.Path;
 
@@ -136,10 +136,8 @@
 					allKnown.add(pr);
 				}
 			}
-		} catch (HgInvalidFileException ex) {
-			HgInvalidControlFileException th = new HgInvalidControlFileException(ex.getMessage(), ex.getCause(), ex.getFile());
-			th.setStackTrace(ex.getStackTrace());
-			throw th;
+		} catch (HgIOException ex) {
+			throw new HgInvalidControlFileException(ex, true);
 		}
 		return this;
 	}