Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgChangesetHandler.java @ 423:9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 23 Mar 2012 22:51:18 +0100 |
parents | f9f3e9b67ccc |
children | 31a89587eb04 |
comparison
equal
deleted
inserted
replaced
422:5d1cc7366d04 | 423:9c9c442b5f2e |
---|---|
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 * |
14 * the terms of a license other than GNU General Public License | 14 * the terms of a license other than GNU General Public License |
15 * contact TMate Software at support@hg4j.com | 15 * contact TMate Software at support@hg4j.com |
16 */ | 16 */ |
17 package org.tmatesoft.hg.core; | 17 package org.tmatesoft.hg.core; |
18 | 18 |
19 import org.tmatesoft.hg.internal.Callback; | |
19 import org.tmatesoft.hg.util.CancelledException; | 20 import org.tmatesoft.hg.util.CancelledException; |
20 | 21 |
21 /** | 22 /** |
22 * Callback to process {@link HgChangeset changesets}. | 23 * Callback to process {@link HgChangeset changesets}. |
23 * | 24 * |
24 * @author Artem Tikhomirov | 25 * @author Artem Tikhomirov |
25 * @author TMate Software Ltd. | 26 * @author TMate Software Ltd. |
26 */ | 27 */ |
28 @Callback | |
27 public interface HgChangesetHandler/*XXX perhaps, shall parameterize with exception clients can throw, like: <E extends Exception>*/ { | 29 public interface HgChangesetHandler/*XXX perhaps, shall parameterize with exception clients can throw, like: <E extends Exception>*/ { |
28 /** | 30 /** |
29 * @param changeset not necessarily a distinct instance each time, {@link HgChangeset#clone() clone()} if need a copy. | 31 * @param changeset not necessarily a distinct instance each time, {@link HgChangeset#clone() clone()} if need a copy. |
32 * @throws HgCallbackTargetException wrapper for any exception user code may produce | |
30 * @throws CancelledException if handler is not interested in more changesets and iteration shall stop | 33 * @throws CancelledException if handler is not interested in more changesets and iteration shall stop |
31 * @throws RuntimeException or any subclass thereof to indicate error. General contract is that RuntimeExceptions | |
32 * will be re-thrown wrapped into {@link HgCallbackTargetException}. | |
33 */ | 34 */ |
34 void next(HgChangeset changeset) throws CancelledException; | 35 void next(HgChangeset changeset) throws HgCallbackTargetException, CancelledException; |
35 } | 36 } |