comparison src/org/tmatesoft/hg/core/HgFileInformer.java @ 354:5f9073eabf06

Propagate errors with exceptions up to a end client
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 01 Dec 2011 05:21:40 +0100
parents 981f9f50bb6c
children 8099939af5fa
comparison
equal deleted inserted replaced
353:0f3687e79f5a 354:5f9073eabf06
34 * catCmd.execute(...); 34 * catCmd.execute(...);
35 * ... 35 * ...
36 * } 36 * }
37 * </pre></code> 37 * </pre></code>
38 * 38 *
39 * FIXME need better name. It's more about manifest of specific changeset, rather than informing (about) files
40 *
39 * @author Artem Tikhomirov 41 * @author Artem Tikhomirov
40 * @author TMate Software Ltd. 42 * @author TMate Software Ltd.
41 */ 43 */
42 public class HgFileInformer { 44 public class HgFileInformer {
43 45
85 * 87 *
86 * @param file name of the file in question 88 * @param file name of the file in question
87 * @return <code>true</code> if file is known at the selected changeset. 89 * @return <code>true</code> if file is known at the selected changeset.
88 * @throws IllegalArgumentException if {@link #changeset(Nodeid)} not specified or file argument is bad. 90 * @throws IllegalArgumentException if {@link #changeset(Nodeid)} not specified or file argument is bad.
89 */ 91 */
90 public boolean check(Path file) { // XXX IStatus instead of boolean? 92 public boolean check(Path file) throws HgInvalidControlFileException { // XXX IStatus instead of boolean? If status, shall it handle exceptions as well?
91 fileRevision = null; 93 fileRevision = null;
92 checked = false; 94 checked = false;
93 renamed = false; 95 renamed = false;
94 if (cset == null || file == null || file.isDirectory()) { 96 if (cset == null || file == null || file.isDirectory()) {
95 throw new IllegalArgumentException(); 97 throw new IllegalArgumentException();