Mercurial > hg4j
comparison src/org/tmatesoft/hg/core/HgCallbackTargetException.java @ 427:31a89587eb04
FIXMEs: consistent names, throws for commands and their handlers. Use of checked exceptions in hi-level api
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 29 Mar 2012 17:14:35 +0200 |
parents | 9c9c442b5f2e |
children | b9e5ac26dd83 |
comparison
equal
deleted
inserted
replaced
426:063b0663495a | 427:31a89587eb04 |
---|---|
27 * <p>Generally, client need to pass own error information/exceptions from within implementations of the callback methods they supply. | 27 * <p>Generally, client need to pass own error information/exceptions from within implementations of the callback methods they supply. |
28 * However, there's no straightforward way to alter throws clause for these methods, and alternatives like generic {@link Exception} or | 28 * However, there's no straightforward way to alter throws clause for these methods, and alternatives like generic {@link Exception} or |
29 * library's own {@link HgException} are rather obscure. Suggested approach is to wrap whatever exception user code produces with | 29 * library's own {@link HgException} are rather obscure. Suggested approach is to wrap whatever exception user code produces with |
30 * {@link HgCallbackTargetException}, the only checked exception allowed out from a callback. | 30 * {@link HgCallbackTargetException}, the only checked exception allowed out from a callback. |
31 * | 31 * |
32 * <p>It's intentionally not a subclass of {@link HgException} to avoid get mixed with library own errors and be processed separately. | 32 * <p>It's intentionally not a subclass of {@link HgException} to avoid get mixed with library own errors and be processed separately. |
33 * | 33 * |
34 * FIXME REVISIT shall just throw HgCallbackTargetException from any handler, and do not catch anything in commands at all. | 34 * <p>Top-level API handlers ({@link HgStatusHandler}, {@link HgManifestHandler}, {@link HgChangesetHandler}, etc) allow to throw |
35 * HgCallbackTargetException from their methods. Exceptions throws this way are not handled in corresponding commands, except for | |
36 * revision or file name specification, unless already set. The, these exceptions go straight to the command caller. | |
35 * | 37 * |
36 * @author Artem Tikhomirov | 38 * @author Artem Tikhomirov |
37 * @author TMate Software Ltd. | 39 * @author TMate Software Ltd. |
38 */ | 40 */ |
39 @SuppressWarnings("serial") | 41 @SuppressWarnings("serial") |