1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 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 public static final ErrorCode INVALID_CVSROOT = new ErrorCode(EXCEPTION_PREFIX + "00010");
38
39 /***
40 * Authentication against a CVS repository failed.
41 */
42 public static final ErrorCode AUTHENTICATION_ERROR = new ErrorCode(EXCEPTION_PREFIX + "00011");
43
44 /***
45 * The module already exists in the repository.
46 */
47 public static final ErrorCode MODULE_EXISTS_IN_REPOSITORY = new ErrorCode(EXCEPTION_PREFIX + "00015");
48
49 /***
50 * The file that is added to a repository already exists
51 */
52 public static final ErrorCode FILE_EXISTS_IN_REPOSITORY = new ErrorCode(EXCEPTION_PREFIX + "00017");
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 public static final ErrorCode VERSION_NOT_FOUND = new ErrorCode(EXCEPTION_PREFIX + "00018");
59
60 /***
61 * Symbolic name rejected by CVS
62 */
63 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 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 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 public static final ErrorCode SECURITY_VIOLATION = new ErrorCode(EXCEPTION_PREFIX + "00022");
79
80 /***
81 * Error thrown when writing the module history failed.
82 */
83 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 public static final ErrorCode TEMPLATE_CREATION_FAILED = new ErrorCode(EXCEPTION_PREFIX + "00024");
89
90
91 public CVSException(ErrorCode errorCode) {
92 super(errorCode);
93 }
94
95 public CVSException(Throwable t, ErrorCode errorCode) {
96 super(t, errorCode);
97 }
98
99 public CVSException(ErrorCode errorCode, Object[] messageArguments) {
100 super(errorCode, messageArguments);
101 }
102
103 public CVSException(Throwable t, ErrorCode errorCode, Object[] messageArguments) {
104 super(t, errorCode, messageArguments);
105 }
106
107 }