Mercurial > hg4j
comparison src/org/tmatesoft/hg/core/HgStatusHandler.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 | 150500515714 |
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.Path; | 20 import org.tmatesoft.hg.util.Path; |
20 import org.tmatesoft.hg.util.Status; | 21 import org.tmatesoft.hg.util.Status; |
21 | 22 |
22 /** | 23 /** |
23 * Callback to process {@link HgStatus} objects. | 24 * Callback to process {@link HgStatus} objects. |
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 HgStatusHandler { | 29 public interface HgStatusHandler { |
28 | 30 |
29 /* XXX #next() as in HgChangesetHandler? | 31 /** #next() as in HgChangesetHandler? |
30 * perhaps, handle() is better name? If yes, rename method in HgChangesetHandler, too, to make them similar. | 32 * FIXME perhaps, handle() is better name? If yes, rename method in HgChangesetHandler, too, to make them similar. |
31 * void next(HgStatus s); | 33 * void next(HgStatus s); |
32 * XXX describe RTE and HgCallbackTargetException | 34 * @throws HgCallbackTargetException wrapper for any exception user code may produce |
33 */ | 35 */ |
34 void handleStatus(HgStatus s); | 36 void handleStatus(HgStatus s) throws HgCallbackTargetException; |
35 | 37 |
36 /** | 38 /** |
37 * Report non-critical error processing single file during status operation | 39 * Report non-critical error processing single file during status operation |
38 * @param file name of the file that caused the trouble | 40 * @param file name of the file that caused the trouble |
39 * @param s error description object | 41 * @param s error description object |
42 * @throws HgCallbackTargetException wrapper for any exception user code may produce | |
40 */ | 43 */ |
41 void handleError(Path file, Status s); | 44 void handleError(Path file, Status s) throws HgCallbackTargetException; |
42 } | 45 } |