comparison src/org/tmatesoft/hg/core/HgLogCommand.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 994b5813a925
children 1fcc7f7b6d65
comparison
equal deleted inserted replaced
395:4732fffff58a 396:0ae53c32ecef
1 /* 1 /*
2 * Copyright (c) 2011 TMate Software Ltd 2 * Copyright (c) 2011-2012 TMate Software Ltd
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License. 6 * the Free Software Foundation; version 2 of the License.
7 * 7 *
184 } 184 }
185 185
186 /** 186 /**
187 * Similar to {@link #execute(org.tmatesoft.hg.repo.RawChangeset.Inspector)}, collects and return result as a list. 187 * Similar to {@link #execute(org.tmatesoft.hg.repo.RawChangeset.Inspector)}, collects and return result as a list.
188 */ 188 */
189 public List<HgChangeset> execute() throws HgDataStreamException { 189 public List<HgChangeset> execute() throws HgException {
190 CollectHandler collector = new CollectHandler(); 190 CollectHandler collector = new CollectHandler();
191 try { 191 try {
192 execute(collector); 192 execute(collector);
193 } catch (HgException ex) { 193 } catch (CancelledException ex) {
194 // can't happen as long as our CollectHandler doesn't throw any exception 194 // can't happen as long as our CollectHandler doesn't throw any exception
195 throw new HgBadStateException(ex.getCause());
196 } catch (CancelledException ex) {
197 // can't happen, see above
198 throw new HgBadStateException(ex); 195 throw new HgBadStateException(ex);
199 } 196 }
200 return collector.getChanges(); 197 return collector.getChanges();
201 } 198 }
202 199