diff cmdline/org/tmatesoft/hg/console/ChangesetDumpHandler.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 37d97854c6ad
children
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/ChangesetDumpHandler.java	Tue May 21 20:17:33 2013 +0200
+++ b/cmdline/org/tmatesoft/hg/console/ChangesetDumpHandler.java	Wed May 22 15:52:31 2013 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2012 TMate Software Ltd
+ * Copyright (c) 2011-2013 TMate Software Ltd
  *  
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
 import org.tmatesoft.hg.core.HgFileRevision;
 import org.tmatesoft.hg.core.Nodeid;
 import org.tmatesoft.hg.repo.HgRepository;
+import org.tmatesoft.hg.repo.HgRuntimeException;
 import org.tmatesoft.hg.util.Path;
 
 /**
@@ -43,7 +44,7 @@
 	private final HgRepository repo;
 	private final int tip;
 
-	public ChangesetDumpHandler(HgRepository hgRepo) {
+	public ChangesetDumpHandler(HgRepository hgRepo) throws HgRuntimeException {
 		repo = hgRepo;
 		tip = hgRepo.getChangelog().getLastRevision();
 	}
@@ -63,7 +64,7 @@
 		return this;
 	}
 
-	public void cset(HgChangeset changeset) {
+	public void cset(HgChangeset changeset) throws HgRuntimeException {
 		try {
 			final String s = print(changeset);
 			if (reverseOrder) {
@@ -89,7 +90,7 @@
 		l.clear();
 	}
 
-	private String print(HgChangeset cset) throws HgException {
+	private String print(HgChangeset cset) throws HgException, HgRuntimeException {
 		StringBuilder sb = new StringBuilder();
 		Formatter f = new Formatter(sb);
 		final Nodeid csetNodeid = cset.getNodeid();