Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgLibraryFailureException.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 | |
children | b286222158be |
comparison
equal
deleted
inserted
replaced
426:063b0663495a | 427:31a89587eb04 |
---|---|
1 /* | |
2 * Copyright (c) 2012 TMate Software Ltd | |
3 * | |
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 | |
6 * the Free Software Foundation; version 2 of the License. | |
7 * | |
8 * This program is distributed in the hope that it will be useful, | |
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 * GNU General Public License for more details. | |
12 * | |
13 * For information on how to redistribute this software under | |
14 * the terms of a license other than GNU General Public License | |
15 * contact TMate Software at support@hg4j.com | |
16 */ | |
17 package org.tmatesoft.hg.core; | |
18 | |
19 import org.tmatesoft.hg.repo.HgRuntimeException; | |
20 | |
21 /** | |
22 * Sole purpose of this exception is to wrap unexpected errors from the library implementation and | |
23 * propagate them to clients of hi-level API for graceful (and explicit) processing. | |
24 * | |
25 * @author Artem Tikhomirov | |
26 * @author TMate Software Ltd. | |
27 */ | |
28 @SuppressWarnings("serial") | |
29 public class HgLibraryFailureException extends HgException { | |
30 | |
31 public HgLibraryFailureException(HgRuntimeException cause) { | |
32 super(cause); | |
33 assert cause != null; | |
34 } | |
35 | |
36 @Override | |
37 public HgRuntimeException getCause() { | |
38 return (HgRuntimeException) super.getCause(); | |
39 } | |
40 } |