%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
nl.toolforge.karma.core.vc.cvsimpl.CVSException |
|
|
1 | /* |
|
2 | Karma core - Core of the Karma application |
|
3 | Copyright (C) 2004 Toolforge <www.toolforge.nl> |
|
4 | ||
5 | This library is free software; you can redistribute it and/or |
|
6 | modify it under the terms of the GNU Lesser General Public |
|
7 | License as published by the Free Software Foundation; either |
|
8 | version 2.1 of the License, or (at your option) any later version. |
|
9 | ||
10 | This library is distributed in the hope that it will be useful, |
|
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 | Lesser General Public License for more details. |
|
14 | ||
15 | You should have received a copy of the GNU Lesser General Public |
|
16 | License along with this library; if not, write to the Free Software |
|
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | */ |
|
19 | package nl.toolforge.karma.core.vc.cvsimpl; |
|
20 | ||
21 | import nl.toolforge.karma.core.ErrorCode; |
|
22 | import nl.toolforge.karma.core.vc.VersionControlException; |
|
23 | ||
24 | /** |
|
25 | * Exceptions related to CVS stuff. |
|
26 | * |
|
27 | * @author D.A. Smedes |
|
28 | * @version $Id: |
|
29 | */ |
|
30 | public class CVSException extends VersionControlException { |
|
31 | ||
32 | 88 | public static String EXCEPTION_PREFIX = "CVS-"; |
33 | ||
34 | /** |
|
35 | * When no valid <code>CVSROOT</code> could be compiled from <code>CVSRepository</code> instance variables. |
|
36 | */ |
|
37 | 88 | public static final ErrorCode INVALID_CVSROOT = new ErrorCode(EXCEPTION_PREFIX + "00010"); |
38 | ||
39 | /** |
|
40 | * Authentication against a CVS repository failed. |
|
41 | */ |
|
42 | 88 | public static final ErrorCode AUTHENTICATION_ERROR = new ErrorCode(EXCEPTION_PREFIX + "00011"); |
43 | ||
44 | /** |
|
45 | * The module already exists in the repository. |
|
46 | */ |
|
47 | 88 | public static final ErrorCode MODULE_EXISTS_IN_REPOSITORY = new ErrorCode(EXCEPTION_PREFIX + "00015"); // todo : to superclass ? |
48 | ||
49 | /** |
|
50 | * The file that is added to a repository already exists |
|
51 | */ |
|
52 | 88 | public static final ErrorCode FILE_EXISTS_IN_REPOSITORY = new ErrorCode(EXCEPTION_PREFIX + "00017"); // todo : to superclass ? |
53 | ||
54 | /** |
|
55 | * Version not found for the module. This error occurs when no symbolic name exists for the module that identifies |
|
56 | * the version. |
|
57 | */ |
|
58 | 88 | public static final ErrorCode VERSION_NOT_FOUND = new ErrorCode(EXCEPTION_PREFIX + "00018"); // todo : to superclass ? |
59 | ||
60 | /** |
|
61 | * Symbolic name rejected by CVS |
|
62 | */ |
|
63 | 88 | public static final ErrorCode INVALID_SYMBOLIC_NAME = new ErrorCode(EXCEPTION_PREFIX + "00019"); |
64 | ||
65 | /** |
|
66 | * Wrapper around <code>org.netbeans.lib.cvsclient.command.CommandException</code>. Can occur when processing the |
|
67 | * response from CVS or when the command was aborted. |
|
68 | */ |
|
69 | 88 | public static final ErrorCode INTERNAL_ERROR = new ErrorCode(EXCEPTION_PREFIX + "00020"); |
70 | /** |
|
71 | * When something is wrong with the local copy of a module. |
|
72 | */ |
|
73 | 88 | public static final ErrorCode LOCAL_MODULE_ERROR = new ErrorCode(EXCEPTION_PREFIX + "00021"); |
74 | ||
75 | /** |
|
76 | * When the cvs reports a security violation. Generally caused by the fact that the user has to write access to the |
|
77 | */ |
|
78 | 88 | public static final ErrorCode SECURITY_VIOLATION = new ErrorCode(EXCEPTION_PREFIX + "00022"); |
79 | ||
80 | /** |
|
81 | * Error thrown when writing the module history failed. |
|
82 | */ |
|
83 | 88 | public static final ErrorCode MODULE_HISTORY_ERROR = new ErrorCode(EXCEPTION_PREFIX + "00023"); |
84 | ||
85 | /** |
|
86 | * Error thrown when copying the module templates failed failed. |
|
87 | */ |
|
88 | 88 | public static final ErrorCode TEMPLATE_CREATION_FAILED = new ErrorCode(EXCEPTION_PREFIX + "00024"); |
89 | ||
90 | ||
91 | public CVSException(ErrorCode errorCode) { |
|
92 | 26 | super(errorCode); |
93 | 26 | } |
94 | ||
95 | public CVSException(Throwable t, ErrorCode errorCode) { |
|
96 | 0 | super(t, errorCode); |
97 | 0 | } |
98 | ||
99 | public CVSException(ErrorCode errorCode, Object[] messageArguments) { |
|
100 | 206 | super(errorCode, messageArguments); |
101 | 206 | } |
102 | ||
103 | public CVSException(Throwable t, ErrorCode errorCode, Object[] messageArguments) { |
|
104 | 0 | super(t, errorCode, messageArguments); |
105 | 0 | } |
106 | ||
107 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |