Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgCatCommand.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 | d68dcb3b5f49 |
children | 91d75e1bac9f |
comparison
equal
deleted
inserted
replaced
353:0f3687e79f5a | 354:5f9073eabf06 |
---|---|
134 * | 134 * |
135 * @param sink output channel to write data to. | 135 * @param sink output channel to write data to. |
136 * @throws HgDataStreamException | 136 * @throws HgDataStreamException |
137 * @throws IllegalArgumentException when command arguments are incomplete or wrong | 137 * @throws IllegalArgumentException when command arguments are incomplete or wrong |
138 */ | 138 */ |
139 public void execute(ByteChannel sink) throws HgDataStreamException, CancelledException { | 139 public void execute(ByteChannel sink) throws HgDataStreamException, HgInvalidControlFileException, CancelledException { |
140 if (localRevision == BAD_REVISION && revision == null && cset == null) { | 140 if (localRevision == BAD_REVISION && revision == null && cset == null) { |
141 throw new IllegalArgumentException("File revision, corresponing local number, or a changset nodeid shall be specified"); | 141 throw new IllegalArgumentException("File revision, corresponing local number, or a changset nodeid shall be specified"); |
142 } | 142 } |
143 if (file == null) { | 143 if (file == null) { |
144 throw new IllegalArgumentException("Name of the file is missing"); | 144 throw new IllegalArgumentException("Name of the file is missing"); |