001: /*
002: * ====================================================================
003: * Copyright (c) 2004-2008 TMate Software Ltd. All rights reserved.
004: *
005: * This software is licensed as described in the file COPYING, which
006: * you should have received as part of this distribution. The terms
007: * are also available at http://svnkit.com/license.html
008: * If newer versions of this license are posted there, you may use a
009: * newer version instead, at your option.
010: * ====================================================================
011: */
012: package org.tmatesoft.svn.core;
013:
014: import java.io.IOException;
015: import java.io.ObjectInputStream;
016: import java.io.ObjectOutputStream;
017: import java.io.Serializable;
018: import java.util.HashMap;
019: import java.util.Map;
020:
021: /**
022: * The <b>SVNErrorCode</b> class represents possible predefined kinds
023: * of errors with their own identifying information. Each <b>SVNErrorCode</b>
024: * has its common description, belongs to a definite category of errors and
025: * also has its unique error code int value based upon the category.
026: *
027: * <p>
028: * Error codes (values, common descriptions and categories) are similar
029: * to ones in the native SVN.
030: *
031: * @version 1.1.1
032: * @author TMate Software Ltd.
033: */
034: public class SVNErrorCode implements Serializable {
035:
036: private String myDescription;
037: private int myCategory;
038: private int myCode;
039:
040: private static final Map ourErrorCodes = new HashMap();
041:
042: /**
043: * Gets an error code object given its unique error code number.
044: * If no definite error code objects corresponds to the provided
045: * value, returns {@link #UNKNOWN}.
046: *
047: * @param code an error code number
048: * @return a corresponding <b>SVNErrorCode</b>.
049: */
050: public static SVNErrorCode getErrorCode(int code) {
051: SVNErrorCode errorCode = (SVNErrorCode) ourErrorCodes
052: .get(new Integer(code));
053: if (errorCode == null) {
054: errorCode = UNKNOWN;
055: }
056: return errorCode;
057: }
058:
059: protected SVNErrorCode(int category, int index, String description) {
060: myCategory = category;
061: myCode = category + index;
062: myDescription = description;
063: ourErrorCodes.put(new Integer(myCode), this );
064: }
065:
066: /**
067: * Returns a unique error code value.
068: *
069: * @return an error code number
070: */
071: public int getCode() {
072: return myCode;
073: }
074:
075: /**
076: * Returns the category this error code object belongs to.
077: *
078: * @return an error code category
079: */
080: public int getCategory() {
081: return myCategory;
082: }
083:
084: /**
085: * Returns a description of this error.
086: *
087: * @return an error description common for all errors of the same
088: * error code
089: */
090: public String getDescription() {
091: return myDescription;
092: }
093:
094: /**
095: * Returns a hash code for this object.
096: *
097: * @return hash code value
098: */
099: public int hashCode() {
100: return myCode;
101: }
102:
103: /**
104: * Says if the given object and this one are equal.
105: *
106: * @param o an object to compare with
107: * @return <span class="javakeyword">true</span> if equals,
108: * <span class="javakeyword">false</span> otherwise
109: */
110: public boolean equals(Object o) {
111: if (o == null || o.getClass() != SVNErrorCode.class) {
112: return false;
113: }
114: return myCode == ((SVNErrorCode) o).myCode;
115: }
116:
117: /**
118: * Says if this error is an authentication error.
119: *
120: * @return <span class="javakeyword">true</span> if it is,
121: * <span class="javakeyword">false</span> otherwise
122: */
123: public boolean isAuthentication() {
124: return this == RA_NOT_AUTHORIZED || this == RA_UNKNOWN_AUTH
125: || getCategory() == AUTHZ_CATEGORY
126: || getCategory() == AUTHN_CATEGORY;
127: }
128:
129: private void writeObject(ObjectOutputStream os) throws IOException {
130: os.writeInt(myCode);
131: }
132:
133: private void readObject(ObjectInputStream is) throws IOException {
134: myCode = is.readInt();
135: }
136:
137: private Object readResolve() {
138: return ourErrorCodes.get(new Integer(myCode));
139: }
140:
141: /**
142: * Gives a string representation of this object.
143: *
144: * @return a string representing this object
145: */
146: public String toString() {
147: return myCode + ": " + myDescription;
148: }
149:
150: private static final int ERR_BASE = 120000;
151: private static final int ERR_CATEGORY_SIZE = 5000;
152:
153: public static final int BAD_CATEGORY = ERR_BASE + 1
154: * ERR_CATEGORY_SIZE;
155: public static final int XML_CATEGORY = ERR_BASE + 2
156: * ERR_CATEGORY_SIZE;
157: public static final int IO_CATEGORY = ERR_BASE + 3
158: * ERR_CATEGORY_SIZE;
159: public static final int STREAM_CATEGORY = ERR_BASE + 4
160: * ERR_CATEGORY_SIZE;
161: public static final int NODE_CATEGORY = ERR_BASE + 5
162: * ERR_CATEGORY_SIZE;
163: public static final int ENTRY_CATEGORY = ERR_BASE + 6
164: * ERR_CATEGORY_SIZE;
165: public static final int WC_CATEGORY = ERR_BASE + 7
166: * ERR_CATEGORY_SIZE;
167: public static final int FS_CATEGORY = ERR_BASE + 8
168: * ERR_CATEGORY_SIZE;
169: public static final int REPOS_CATEGORY = ERR_BASE + 9
170: * ERR_CATEGORY_SIZE;
171: public static final int RA_CATEGORY = ERR_BASE + 10
172: * ERR_CATEGORY_SIZE;
173: public static final int RA_DAV_CATEGORY = ERR_BASE + 11
174: * ERR_CATEGORY_SIZE;
175: public static final int RA_LOCAL_CATEGORY = ERR_BASE + 12
176: * ERR_CATEGORY_SIZE;
177: public static final int SVNDIFF_CATEGORY = ERR_BASE + 13
178: * ERR_CATEGORY_SIZE;
179: public static final int APMOD_CATEGORY = ERR_BASE + 14
180: * ERR_CATEGORY_SIZE;
181: public static final int CLIENT_CATEGORY = ERR_BASE + 15
182: * ERR_CATEGORY_SIZE;
183: public static final int MISC_CATEGORY = ERR_BASE + 16
184: * ERR_CATEGORY_SIZE;
185: public static final int CL_CATEGORY = ERR_BASE + 17
186: * ERR_CATEGORY_SIZE;
187: public static final int RA_SVN_CATEGORY = ERR_BASE + 18
188: * ERR_CATEGORY_SIZE;
189: public static final int AUTHN_CATEGORY = ERR_BASE + 19
190: * ERR_CATEGORY_SIZE;
191: public static final int AUTHZ_CATEGORY = ERR_BASE + 20
192: * ERR_CATEGORY_SIZE;
193:
194: public static final SVNErrorCode UNKNOWN = new SVNErrorCode(
195: MISC_CATEGORY, ERR_CATEGORY_SIZE - 100, "Unknown error");
196: public static final SVNErrorCode IO_ERROR = new SVNErrorCode(
197: MISC_CATEGORY, ERR_CATEGORY_SIZE - 101, "Generic IO error");
198:
199: public static final SVNErrorCode BAD_CONTAINING_POOL = new SVNErrorCode(
200: BAD_CATEGORY, 0,
201: "Bad parent pool passed to svn_make_pool()");
202: public static final SVNErrorCode BAD_FILENAME = new SVNErrorCode(
203: BAD_CATEGORY, 1, "Bogus filename");
204: public static final SVNErrorCode BAD_URL = new SVNErrorCode(
205: BAD_CATEGORY, 2, "Bogus URL");
206: public static final SVNErrorCode BAD_DATE = new SVNErrorCode(
207: BAD_CATEGORY, 3, "Bogus date");
208: public static final SVNErrorCode BAD_MIME_TYPE = new SVNErrorCode(
209: BAD_CATEGORY, 4, "Bogus mime-type");
210: public static final SVNErrorCode BAD_VERSION_FILE_FORMAT = new SVNErrorCode(
211: BAD_CATEGORY, 6, "Version file format not correct");
212:
213: public static final SVNErrorCode XML_ATTRIB_NOT_FOUND = new SVNErrorCode(
214: XML_CATEGORY, 0, "No such XML tag attribute");
215: public static final SVNErrorCode XML_MISSING_ANCESTRY = new SVNErrorCode(
216: XML_CATEGORY, 1, "<delta-pkg> is missing ancestry");
217: public static final SVNErrorCode XML_UNKNOWN_ENCODING = new SVNErrorCode(
218: XML_CATEGORY, 2,
219: "Unrecognized binary data encoding; can't decode");
220: public static final SVNErrorCode XML_MALFORMED = new SVNErrorCode(
221: XML_CATEGORY, 3, "XML data was not well-formed");
222: public static final SVNErrorCode XML_UNESCAPABLE_DATA = new SVNErrorCode(
223: XML_CATEGORY, 4, "Data cannot be safely XML-escaped");
224:
225: public static final SVNErrorCode IO_INCONSISTENT_EOL = new SVNErrorCode(
226: IO_CATEGORY, 0, "Inconsistent line ending style");
227: public static final SVNErrorCode IO_UNKNOWN_EOL = new SVNErrorCode(
228: IO_CATEGORY, 1, "Unrecognized line ending style");
229: public static final SVNErrorCode IO_CORRUPT_EOL = new SVNErrorCode(
230: IO_CATEGORY, 2, "Line endings other than expected");
231: public static final SVNErrorCode IO_UNIQUE_NAMES_EXHAUSTED = new SVNErrorCode(
232: IO_CATEGORY, 3, "Ran out of unique names");
233: public static final SVNErrorCode IO_PIPE_FRAME_ERROR = new SVNErrorCode(
234: IO_CATEGORY, 4, "Framing error in pipe protocol");
235: public static final SVNErrorCode IO_PIPE_READ_ERROR = new SVNErrorCode(
236: IO_CATEGORY, 5, "Read error in pipe");
237: public static final SVNErrorCode IO_WRITE_ERROR = new SVNErrorCode(
238: IO_CATEGORY, 6, "Write error");
239:
240: public static final SVNErrorCode STREAM_UNEXPECTED_EOF = new SVNErrorCode(
241: STREAM_CATEGORY, 0, "Unexpected EOF on stream");
242: public static final SVNErrorCode STREAM_MALFORMED_DATA = new SVNErrorCode(
243: STREAM_CATEGORY, 1, "Malformed stream data");
244: public static final SVNErrorCode STREAM_UNRECOGNIZED_DATA = new SVNErrorCode(
245: STREAM_CATEGORY, 2, "Unrecognized stream data");
246:
247: public static final SVNErrorCode NODE_UNKNOWN_KIND = new SVNErrorCode(
248: NODE_CATEGORY, 0, "Unknown svn_node_kind");
249: public static final SVNErrorCode NODE_UNEXPECTED_KIND = new SVNErrorCode(
250: NODE_CATEGORY, 1, "Unexpected node kind found");
251:
252: public static final SVNErrorCode ENTRY_NOT_FOUND = new SVNErrorCode(
253: ENTRY_CATEGORY, 0, "Can't find an entry");
254: public static final SVNErrorCode ENTRY_EXISTS = new SVNErrorCode(
255: ENTRY_CATEGORY, 2, "Entry already exists");
256: public static final SVNErrorCode ENTRY_MISSING_REVISION = new SVNErrorCode(
257: ENTRY_CATEGORY, 3, "Entry has no revision");
258: public static final SVNErrorCode ENTRY_MISSING_URL = new SVNErrorCode(
259: ENTRY_CATEGORY, 4, "Entry has no URL");
260: public static final SVNErrorCode ENTRY_ATTRIBUTE_INVALID = new SVNErrorCode(
261: ENTRY_CATEGORY, 5, "Entry has an invalid attribute");
262:
263: public static final SVNErrorCode WC_OBSTRUCTED_UPDATE = new SVNErrorCode(
264: WC_CATEGORY, 0, "Obstructed update");
265: public static final SVNErrorCode WC_UNWIND_MISMATCH = new SVNErrorCode(
266: WC_CATEGORY, 1, "Mismatch popping the WC unwind stack");
267: public static final SVNErrorCode WC_UNWIND_EMPTY = new SVNErrorCode(
268: WC_CATEGORY, 2, "Attempt to pop empty WC unwind stack");
269: public static final SVNErrorCode WC_UNWIND_NOT_EMPTY = new SVNErrorCode(
270: WC_CATEGORY, 3,
271: "Attempt to unlock with non-empty unwind stack");
272: public static final SVNErrorCode WC_LOCKED = new SVNErrorCode(
273: WC_CATEGORY, 4, "Attempted to lock an already-locked dir");
274: public static final SVNErrorCode WC_NOT_LOCKED = new SVNErrorCode(
275: WC_CATEGORY, 5,
276: "Working copy not locked; this is probably a bug, please report");
277: public static final SVNErrorCode WC_INVALID_LOCK = new SVNErrorCode(
278: WC_CATEGORY, 6, "Invalid lock");
279: public static final SVNErrorCode WC_NOT_DIRECTORY = new SVNErrorCode(
280: WC_CATEGORY, 7, "Path is not a working copy directory");
281: public static final SVNErrorCode WC_NOT_FILE = new SVNErrorCode(
282: WC_CATEGORY, 8, "Path is not a working copy file");
283: public static final SVNErrorCode WC_BAD_ADM_LOG = new SVNErrorCode(
284: WC_CATEGORY, 9, "Problem running log");
285: public static final SVNErrorCode WC_PATH_NOT_FOUND = new SVNErrorCode(
286: WC_CATEGORY, 10, "Can't find a working copy path");
287: public static final SVNErrorCode WC_NOT_UP_TO_DATE = new SVNErrorCode(
288: WC_CATEGORY, 11, "Working copy is not up-to-date");
289: public static final SVNErrorCode WC_LEFT_LOCAL_MOD = new SVNErrorCode(
290: WC_CATEGORY, 12,
291: "Left locally modified or unversioned files");
292: public static final SVNErrorCode WC_SCHEDULE_CONFLICT = new SVNErrorCode(
293: WC_CATEGORY, 13,
294: "Unmergeable scheduling requested on an entry");
295: public static final SVNErrorCode WC_PATH_FOUND = new SVNErrorCode(
296: WC_CATEGORY, 14, "Found a working copy path");
297: public static final SVNErrorCode WC_FOUND_CONFLICT = new SVNErrorCode(
298: WC_CATEGORY, 15,
299: "A conflict in the working copy obstructs the current operation");
300: public static final SVNErrorCode WC_CORRUPT = new SVNErrorCode(
301: WC_CATEGORY, 16, "Working copy is corrupt");
302: public static final SVNErrorCode WC_CORRUPT_TEXT_BASE = new SVNErrorCode(
303: WC_CATEGORY, 17, "Working copy text base is corrupt");
304: public static final SVNErrorCode WC_NODE_KIND_CHANGE = new SVNErrorCode(
305: WC_CATEGORY, 18, "Cannot change node kind");
306: public static final SVNErrorCode WC_INVALID_OP_ON_CWD = new SVNErrorCode(
307: WC_CATEGORY, 19,
308: "Invalid operation on the current working directory");
309: public static final SVNErrorCode WC_BAD_ADM_LOG_START = new SVNErrorCode(
310: WC_CATEGORY, 20,
311: "Problem on first log entry in a working copy");
312: public static final SVNErrorCode WC_UNSUPPORTED_FORMAT = new SVNErrorCode(
313: WC_CATEGORY, 21, "Unsupported working copy format");
314: public static final SVNErrorCode WC_BAD_PATH = new SVNErrorCode(
315: WC_CATEGORY, 22,
316: "Path syntax not supported in this context");
317: public static final SVNErrorCode WC_INVALID_SCHEDULE = new SVNErrorCode(
318: WC_CATEGORY, 23, "Invalid schedule");
319: public static final SVNErrorCode WC_INVALID_RELOCATION = new SVNErrorCode(
320: WC_CATEGORY, 24, "Invalid relocation");
321: public static final SVNErrorCode WC_INVALID_SWITCH = new SVNErrorCode(
322: WC_CATEGORY, 25, "Invalid switch");
323:
324: public static final SVNErrorCode FS_GENERAL = new SVNErrorCode(
325: FS_CATEGORY, 0, "General filesystem error");
326: public static final SVNErrorCode FS_CLEANUP = new SVNErrorCode(
327: FS_CATEGORY, 1, "Error closing filesystem");
328: public static final SVNErrorCode FS_ALREADY_OPEN = new SVNErrorCode(
329: FS_CATEGORY, 2, "Filesystem is already open");
330: public static final SVNErrorCode FS_NOT_OPEN = new SVNErrorCode(
331: FS_CATEGORY, 3, "Filesystem is not open");
332: public static final SVNErrorCode FS_CORRUPT = new SVNErrorCode(
333: FS_CATEGORY, 4, "Filesystem is corrupt");
334: public static final SVNErrorCode FS_PATH_SYNTAX = new SVNErrorCode(
335: FS_CATEGORY, 5, "Invalid filesystem path syntax");
336: public static final SVNErrorCode FS_NO_SUCH_REVISION = new SVNErrorCode(
337: FS_CATEGORY, 6, "Invalid filesystem revision number");
338: public static final SVNErrorCode FS_NO_SUCH_TRANSACTION = new SVNErrorCode(
339: FS_CATEGORY, 7, "Invalid filesystem transaction name");
340: public static final SVNErrorCode FS_NO_SUCH_ENTRY = new SVNErrorCode(
341: FS_CATEGORY, 8, "Filesystem directory has no such entry");
342: public static final SVNErrorCode FS_NO_SUCH_REPRESENTATION = new SVNErrorCode(
343: FS_CATEGORY, 9, "Filesystem has no such representation");
344: public static final SVNErrorCode FS_NO_SUCH_STRING = new SVNErrorCode(
345: FS_CATEGORY, 10, "Filesystem has no such string");
346: public static final SVNErrorCode FS_NO_SUCH_COPY = new SVNErrorCode(
347: FS_CATEGORY, 11, "Filesystem has no such copy");
348: public static final SVNErrorCode FS_TRANSACTION_NOT_MUTABLE = new SVNErrorCode(
349: FS_CATEGORY, 12, "The specified transaction is not mutable");
350: public static final SVNErrorCode FS_NOT_FOUND = new SVNErrorCode(
351: FS_CATEGORY, 13, "Filesystem has no item");
352: public static final SVNErrorCode FS_ID_NOT_FOUND = new SVNErrorCode(
353: FS_CATEGORY, 14, "Filesystem has no such node-rev-id");
354: public static final SVNErrorCode FS_NOT_ID = new SVNErrorCode(
355: FS_CATEGORY, 15,
356: "String does not represent a node or node-rev-id");
357: public static final SVNErrorCode FS_NOT_DIRECTORY = new SVNErrorCode(
358: FS_CATEGORY, 16,
359: "Name does not refer to a filesystem directory");
360: public static final SVNErrorCode FS_NOT_FILE = new SVNErrorCode(
361: FS_CATEGORY, 17, "Name does not refer to a filesystem file");
362: public static final SVNErrorCode FS_NOT_SINGLE_PATH_COMPONENT = new SVNErrorCode(
363: FS_CATEGORY, 18, "Name is not a single path component");
364: public static final SVNErrorCode FS_NOT_MUTABLE = new SVNErrorCode(
365: FS_CATEGORY, 19,
366: "Attempt to change immutable filesystem node");
367: public static final SVNErrorCode FS_ALREADY_EXISTS = new SVNErrorCode(
368: FS_CATEGORY, 20, "Item already exists in filesystem");
369: public static final SVNErrorCode FS_ROOT_DIR = new SVNErrorCode(
370: FS_CATEGORY, 21,
371: "Attempt to remove or recreate fs root dir");
372: public static final SVNErrorCode FS_NOT_TXN_ROOT = new SVNErrorCode(
373: FS_CATEGORY, 22, "Object is not a transaction root");
374: public static final SVNErrorCode FS_NOT_REVISION_ROOT = new SVNErrorCode(
375: FS_CATEGORY, 23, "Object is not a revision root");
376: public static final SVNErrorCode FS_CONFLICT = new SVNErrorCode(
377: FS_CATEGORY, 24, "Merge conflict during commit");
378: public static final SVNErrorCode FS_REP_CHANGED = new SVNErrorCode(
379: FS_CATEGORY, 25,
380: "A representation vanished or changed between reads");
381: public static final SVNErrorCode FS_REP_NOT_MUTABLE = new SVNErrorCode(
382: FS_CATEGORY, 26,
383: "Tried to change an immutable representation");
384: public static final SVNErrorCode FS_MALFORMED_SKEL = new SVNErrorCode(
385: FS_CATEGORY, 27, "Malformed skeleton data");
386: public static final SVNErrorCode FS_TXN_OUT_OF_DATE = new SVNErrorCode(
387: FS_CATEGORY, 28, "Transaction is out of date");
388: public static final SVNErrorCode FS_BERKELEY_DB = new SVNErrorCode(
389: FS_CATEGORY, 29, "Berkeley DB error");
390: public static final SVNErrorCode FS_BERKELEY_DB_DEADLOCK = new SVNErrorCode(
391: FS_CATEGORY, 30, "Berkeley DB deadlock error");
392: public static final SVNErrorCode FS_TRANSACTION_DEAD = new SVNErrorCode(
393: FS_CATEGORY, 31, "Transaction is dead");
394: public static final SVNErrorCode FS_TRANSACTION_NOT_DEAD = new SVNErrorCode(
395: FS_CATEGORY, 32, "Transaction is not dead");
396: public static final SVNErrorCode FS_UNKNOWN_FS_TYPE = new SVNErrorCode(
397: FS_CATEGORY, 33, "Unknown FS type");
398: public static final SVNErrorCode FS_NO_USER = new SVNErrorCode(
399: FS_CATEGORY, 34, "No user associated with filesystem");
400: public static final SVNErrorCode FS_PATH_ALREADY_LOCKED = new SVNErrorCode(
401: FS_CATEGORY, 35, "Path is already locked");
402: public static final SVNErrorCode FS_PATH_NOT_LOCKED = new SVNErrorCode(
403: FS_CATEGORY, 36, "Path is not locked");
404: public static final SVNErrorCode FS_BAD_LOCK_TOKEN = new SVNErrorCode(
405: FS_CATEGORY, 37, "Lock token is incorrect");
406: public static final SVNErrorCode FS_NO_LOCK_TOKEN = new SVNErrorCode(
407: FS_CATEGORY, 38, "No lock token provided");
408: public static final SVNErrorCode FS_LOCK_OWNER_MISMATCH = new SVNErrorCode(
409: FS_CATEGORY, 39, "Username does not match lock owner");
410: public static final SVNErrorCode FS_NO_SUCH_LOCK = new SVNErrorCode(
411: FS_CATEGORY, 40, "Filesystem has no such lock");
412: public static final SVNErrorCode FS_LOCK_EXPIRED = new SVNErrorCode(
413: FS_CATEGORY, 41, "Lock has expired");
414: public static final SVNErrorCode FS_OUT_OF_DATE = new SVNErrorCode(
415: FS_CATEGORY, 42, "Item is out of date");
416: public static final SVNErrorCode FS_UNSUPPORTED_FORMAT = new SVNErrorCode(
417: FS_CATEGORY, 43, "Unsupported FS format");
418:
419: public static final SVNErrorCode REPOS_LOCKED = new SVNErrorCode(
420: REPOS_CATEGORY, 0,
421: "The repository is locked, perhaps for db recovery");
422: public static final SVNErrorCode REPOS_HOOK_FAILURE = new SVNErrorCode(
423: REPOS_CATEGORY, 1, "A repository hook failed");
424: public static final SVNErrorCode REPOS_BAD_ARGS = new SVNErrorCode(
425: REPOS_CATEGORY, 2, "Incorrect arguments supplied");
426: public static final SVNErrorCode REPOS_NO_DATA_FOR_REPORT = new SVNErrorCode(
427: REPOS_CATEGORY, 3,
428: "A report cannot be generated because no data was supplied");
429: public static final SVNErrorCode REPOS_BAD_REVISION_REPORT = new SVNErrorCode(
430: REPOS_CATEGORY, 4, "Bogus revision report");
431: public static final SVNErrorCode REPOS_UNSUPPORTED_VERSION = new SVNErrorCode(
432: REPOS_CATEGORY, 5, "Unsupported repository version");
433: public static final SVNErrorCode REPOS_DISABLED_FEATURE = new SVNErrorCode(
434: REPOS_CATEGORY, 6, "Disabled repository feature");
435: public static final SVNErrorCode REPOS_POST_COMMIT_HOOK_FAILED = new SVNErrorCode(
436: REPOS_CATEGORY, 7, "Error running post-commit hook");
437: public static final SVNErrorCode REPOS_POST_LOCK_HOOK_FAILED = new SVNErrorCode(
438: REPOS_CATEGORY, 8, "Error running post-lock hook");
439: public static final SVNErrorCode REPOS_POST_UNLOCK_HOOK_FAILED = new SVNErrorCode(
440: REPOS_CATEGORY, 9, "Error running post-unlock hook");
441:
442: public static final SVNErrorCode RA_ILLEGAL_URL = new SVNErrorCode(
443: RA_CATEGORY, 0, "Bad URL passed to RA layer");
444: public static final SVNErrorCode RA_NOT_AUTHORIZED = new SVNErrorCode(
445: RA_CATEGORY, 1, "Authorization failed");
446: public static final SVNErrorCode RA_UNKNOWN_AUTH = new SVNErrorCode(
447: RA_CATEGORY, 2, "Unknown authorization method");
448: public static final SVNErrorCode RA_NOT_IMPLEMENTED = new SVNErrorCode(
449: RA_CATEGORY, 3, "Repository access method not implemented");
450: public static final SVNErrorCode RA_OUT_OF_DATE = new SVNErrorCode(
451: RA_CATEGORY, 4, "Item is out-of-date");
452: public static final SVNErrorCode RA_NO_REPOS_UUID = new SVNErrorCode(
453: RA_CATEGORY, 5, "Repository has no UUID");
454: public static final SVNErrorCode RA_UNSUPPORTED_ABI_VERSION = new SVNErrorCode(
455: RA_CATEGORY, 6, "Unsupported RA plugin ABI version");
456: public static final SVNErrorCode RA_NOT_LOCKED = new SVNErrorCode(
457: RA_CATEGORY, 7, "Path is not locked");
458:
459: public static final SVNErrorCode RA_DAV_SOCK_INIT = new SVNErrorCode(
460: RA_DAV_CATEGORY, 0, "RA layer failed to init socket layer");
461: public static final SVNErrorCode RA_DAV_CREATING_REQUEST = new SVNErrorCode(
462: RA_DAV_CATEGORY, 1,
463: "RA layer failed to create HTTP request");
464: public static final SVNErrorCode RA_DAV_REQUEST_FAILED = new SVNErrorCode(
465: RA_DAV_CATEGORY, 2, "RA layer request failed");
466: public static final SVNErrorCode RA_DAV_OPTIONS_REQ_FAILED = new SVNErrorCode(
467: RA_DAV_CATEGORY, 3,
468: "RA layer didn't receive requested OPTIONS info");
469: public static final SVNErrorCode RA_DAV_PROPS_NOT_FOUND = new SVNErrorCode(
470: RA_DAV_CATEGORY, 4, "RA layer failed to fetch properties");
471: public static final SVNErrorCode RA_DAV_ALREADY_EXISTS = new SVNErrorCode(
472: RA_DAV_CATEGORY, 5, "RA layer file already exists");
473: public static final SVNErrorCode RA_DAV_INVALID_CONFIG_VALUE = new SVNErrorCode(
474: RA_DAV_CATEGORY, 6, "Invalid configuration value");
475: public static final SVNErrorCode RA_DAV_PATH_NOT_FOUND = new SVNErrorCode(
476: RA_DAV_CATEGORY, 7, "HTTP Path Not Found");
477: public static final SVNErrorCode RA_DAV_PROPPATCH_FAILED = new SVNErrorCode(
478: RA_DAV_CATEGORY, 8, "Failed to execute WebDAV PROPPATCH");
479: public static final SVNErrorCode RA_DAV_MALFORMED_DATA = new SVNErrorCode(
480: RA_DAV_CATEGORY, 9, "Malformed network data");
481: public static final SVNErrorCode RA_DAV_RESPONSE_HEADER_BADNESS = new SVNErrorCode(
482: RA_DAV_CATEGORY, 10,
483: "Unable to extract data from response header");
484:
485: public static final SVNErrorCode RA_LOCAL_REPOS_NOT_FOUND = new SVNErrorCode(
486: RA_LOCAL_CATEGORY, 0, "Couldn't find a repository");
487: public static final SVNErrorCode RA_LOCAL_REPOS_OPEN_FAILED = new SVNErrorCode(
488: RA_LOCAL_CATEGORY, 1, "Couldn't open a repository");
489:
490: public static final SVNErrorCode RA_SVN_CMD_ERR = new SVNErrorCode(
491: RA_SVN_CATEGORY, 0,
492: "Special code for wrapping server errors to report to client");
493: public static final SVNErrorCode RA_SVN_UNKNOWN_CMD = new SVNErrorCode(
494: RA_SVN_CATEGORY, 1, "Unknown svn protocol command");
495: public static final SVNErrorCode RA_SVN_CONNECTION_CLOSED = new SVNErrorCode(
496: RA_SVN_CATEGORY, 2,
497: "Network connection closed unexpectedly");
498: public static final SVNErrorCode RA_SVN_IO_ERROR = new SVNErrorCode(
499: RA_SVN_CATEGORY, 3, "Network read/write error");
500: public static final SVNErrorCode RA_SVN_MALFORMED_DATA = new SVNErrorCode(
501: RA_SVN_CATEGORY, 4, "Malformed network data");
502: public static final SVNErrorCode RA_SVN_REPOS_NOT_FOUND = new SVNErrorCode(
503: RA_SVN_CATEGORY, 5, "Couldn't find a repository");
504: public static final SVNErrorCode RA_SVN_BAD_VERSION = new SVNErrorCode(
505: RA_SVN_CATEGORY, 6, "Client/server version mismatch");
506:
507: public static final SVNErrorCode AUTHN_CREDS_UNAVAILABLE = new SVNErrorCode(
508: AUTHN_CATEGORY, 0, "Credential data unavailable");
509: public static final SVNErrorCode AUTHN_NO_PROVIDER = new SVNErrorCode(
510: AUTHN_CATEGORY, 1, "No authentication provider available");
511: public static final SVNErrorCode AUTHN_PROVIDERS_EXHAUSTED = new SVNErrorCode(
512: AUTHN_CATEGORY, 2, "All authentication providers exhausted");
513: public static final SVNErrorCode AUTHN_CREDS_NOT_SAVED = new SVNErrorCode(
514: AUTHN_CATEGORY, 3, "All authentication providers exhausted");
515:
516: public static final SVNErrorCode AUTHZ_ROOT_UNREADABLE = new SVNErrorCode(
517: AUTHZ_CATEGORY, 0, "Read access denied for root of edit");
518: public static final SVNErrorCode AUTHZ_UNREADABLE = new SVNErrorCode(
519: AUTHZ_CATEGORY, 1, "Item is not readable");
520: public static final SVNErrorCode AUTHZ_PARTIALLY_READABLE = new SVNErrorCode(
521: AUTHZ_CATEGORY, 2, "Item is partially readable");
522: public static final SVNErrorCode AUTHZ_INVALID_CONFIG = new SVNErrorCode(
523: AUTHZ_CATEGORY, 3, "Invalid authz configuration");
524: public static final SVNErrorCode AUTHZ_UNWRITABLE = new SVNErrorCode(
525: AUTHZ_CATEGORY, 4, "Item is not writable");
526:
527: public static final SVNErrorCode SVNDIFF_INVALID_HEADER = new SVNErrorCode(
528: SVNDIFF_CATEGORY, 0, "Svndiff data has invalid header");
529: public static final SVNErrorCode SVNDIFF_CORRUPT_WINDOW = new SVNErrorCode(
530: SVNDIFF_CATEGORY, 1, "Svndiff data contains corrupt window");
531: public static final SVNErrorCode SVNDIFF_BACKWARD_VIEW = new SVNErrorCode(
532: SVNDIFF_CATEGORY, 2,
533: "Svndiff data contains backward-sliding source view");
534: public static final SVNErrorCode SVNDIFF_INVALID_OPS = new SVNErrorCode(
535: SVNDIFF_CATEGORY, 3,
536: "Svndiff data contains invalid instruction");
537: public static final SVNErrorCode SVNDIFF_UNEXPECTED_END = new SVNErrorCode(
538: SVNDIFF_CATEGORY, 4, "Svndiff data ends unexpectedly");
539:
540: public static final SVNErrorCode APMOD_MISSING_PATH_TO_FS = new SVNErrorCode(
541: APMOD_CATEGORY, 0,
542: "Apache has no path to an SVN filesystem");
543: public static final SVNErrorCode APMOD_MALFORMED_URI = new SVNErrorCode(
544: APMOD_CATEGORY, 1, "Apache got a malformed URI");
545: public static final SVNErrorCode APMOD_ACTIVITY_NOT_FOUND = new SVNErrorCode(
546: APMOD_CATEGORY, 2, "Activity not found");
547: public static final SVNErrorCode APMOD_BAD_BASELINE = new SVNErrorCode(
548: APMOD_CATEGORY, 3, "Baseline incorrect");
549: public static final SVNErrorCode APMOD_CONNECTION_ABORTED = new SVNErrorCode(
550: APMOD_CATEGORY, 4, "Input/output error");
551:
552: public static final SVNErrorCode CLIENT_VERSIONED_PATH_REQUIRED = new SVNErrorCode(
553: CLIENT_CATEGORY, 0,
554: "A path under version control is needed for this operation");
555: public static final SVNErrorCode CLIENT_RA_ACCESS_REQUIRED = new SVNErrorCode(
556: CLIENT_CATEGORY, 1,
557: "Repository access is needed for this operation");
558: public static final SVNErrorCode CLIENT_BAD_REVISION = new SVNErrorCode(
559: CLIENT_CATEGORY, 2, "Bogus revision information given");
560: public static final SVNErrorCode CLIENT_DUPLICATE_COMMIT_URL = new SVNErrorCode(
561: CLIENT_CATEGORY, 3,
562: "Attempting to commit to a URL more than once");
563: public static final SVNErrorCode CLIENT_IS_BINARY_FILE = new SVNErrorCode(
564: CLIENT_CATEGORY, 4,
565: "Operation does not apply to binary file");
566: public static final SVNErrorCode CLIENT_INVALID_EXTERNALS_DESCRIPTION = new SVNErrorCode(
567: CLIENT_CATEGORY, 5,
568: "Format of an svn:externals property was invalid");
569: public static final SVNErrorCode CLIENT_MODIFIED = new SVNErrorCode(
570: CLIENT_CATEGORY, 6,
571: "Attempting restricted operation for modified resource");
572: public static final SVNErrorCode CLIENT_IS_DIRECTORY = new SVNErrorCode(
573: CLIENT_CATEGORY, 7, "Operation does not apply to directory");
574: public static final SVNErrorCode CLIENT_REVISION_RANGE = new SVNErrorCode(
575: CLIENT_CATEGORY, 8, "Revision range is not allowed");
576: public static final SVNErrorCode CLIENT_INVALID_RELOCATION = new SVNErrorCode(
577: CLIENT_CATEGORY, 9,
578: "Inter-repository relocation not allowed");
579: public static final SVNErrorCode CLIENT_REVISION_AUTHOR_CONTAINS_NEWLINE = new SVNErrorCode(
580: CLIENT_CATEGORY, 10, "Author name cannot contain a newline");
581: public static final SVNErrorCode CLIENT_PROPERTY_NAME = new SVNErrorCode(
582: CLIENT_CATEGORY, 11, "Bad property name");
583: public static final SVNErrorCode CLIENT_UNRELATED_RESOURCES = new SVNErrorCode(
584: CLIENT_CATEGORY, 12,
585: "Two versioned resources are unrelated");
586: public static final SVNErrorCode CLIENT_MISSING_LOCK_TOKEN = new SVNErrorCode(
587: CLIENT_CATEGORY, 13, "Path has no lock token");
588:
589: public static final SVNErrorCode BASE = new SVNErrorCode(
590: MISC_CATEGORY, 0,
591: "A problem occurred; see later errors for details");
592: public static final SVNErrorCode PLUGIN_LOAD_FAILURE = new SVNErrorCode(
593: MISC_CATEGORY, 1, "Failure loading plugin");
594: public static final SVNErrorCode MALFORMED_FILE = new SVNErrorCode(
595: MISC_CATEGORY, 2, "Malformed file");
596: public static final SVNErrorCode INCOMPLETE_DATA = new SVNErrorCode(
597: MISC_CATEGORY, 3, "Incomplete data");
598: public static final SVNErrorCode INCORRECT_PARAMS = new SVNErrorCode(
599: MISC_CATEGORY, 4, "Incorrect parameters given");
600: public static final SVNErrorCode UNVERSIONED_RESOURCE = new SVNErrorCode(
601: MISC_CATEGORY, 5,
602: "Tried a versioning operation on an unversioned resource");
603: public static final SVNErrorCode TEST_FAILED = new SVNErrorCode(
604: MISC_CATEGORY, 6, "Test failed");
605: public static final SVNErrorCode UNSUPPORTED_FEATURE = new SVNErrorCode(
606: MISC_CATEGORY, 7, "Trying to use an unsupported feature");
607: public static final SVNErrorCode BAD_PROP_KIND = new SVNErrorCode(
608: MISC_CATEGORY, 8, "Unexpected or unknown property kind");
609: public static final SVNErrorCode ILLEGAL_TARGET = new SVNErrorCode(
610: MISC_CATEGORY, 9,
611: "Illegal target for the requested operation");
612: public static final SVNErrorCode DELTA_MD5_CHECKSUM_ABSENT = new SVNErrorCode(
613: MISC_CATEGORY, 10, "MD5 checksum is missing");
614: public static final SVNErrorCode DIR_NOT_EMPTY = new SVNErrorCode(
615: MISC_CATEGORY, 11, "Directory needs to be empty but is not");
616: public static final SVNErrorCode EXTERNAL_PROGRAM = new SVNErrorCode(
617: MISC_CATEGORY, 12, "Error calling external program");
618: public static final SVNErrorCode SWIG_PY_EXCEPTION_SET = new SVNErrorCode(
619: MISC_CATEGORY, 13,
620: "Python exception has been set with the error");
621: public static final SVNErrorCode CHECKSUM_MISMATCH = new SVNErrorCode(
622: MISC_CATEGORY, 14, "A checksum mismatch occurred");
623: public static final SVNErrorCode CANCELLED = new SVNErrorCode(
624: MISC_CATEGORY, 15, "The operation was interrupted");
625: public static final SVNErrorCode INVALID_DIFF_OPTION = new SVNErrorCode(
626: MISC_CATEGORY, 16,
627: "The specified diff option is not supported");
628: public static final SVNErrorCode PROPERTY_NOT_FOUND = new SVNErrorCode(
629: MISC_CATEGORY, 17, "Property not found");
630: public static final SVNErrorCode NO_AUTH_FILE_PATH = new SVNErrorCode(
631: MISC_CATEGORY, 18, "No auth file path available");
632: public static final SVNErrorCode VERSION_MISMATCH = new SVNErrorCode(
633: MISC_CATEGORY, 19, "Incompatible library version");
634:
635: public static final SVNErrorCode CL_ARG_PARSING_ERROR = new SVNErrorCode(
636: CL_CATEGORY, 0, "Client error in parsing arguments");
637: public static final SVNErrorCode CL_INSUFFICIENT_ARGS = new SVNErrorCode(
638: CL_CATEGORY, 1, "Not enough args provided");
639: public static final SVNErrorCode CL_MUTUALLY_EXCLUSIVE_ARGS = new SVNErrorCode(
640: CL_CATEGORY, 2, "Mutually exclusive arguments specified");
641: public static final SVNErrorCode CL_ADM_DIR_RESERVED = new SVNErrorCode(
642: CL_CATEGORY, 3, "Attempted command in administrative dir");
643: public static final SVNErrorCode CL_LOG_MESSAGE_IS_VERSIONED_FILE = new SVNErrorCode(
644: CL_CATEGORY, 4,
645: "The log message file is under version control");
646: public static final SVNErrorCode CL_LOG_MESSAGE_IS_PATHNAME = new SVNErrorCode(
647: CL_CATEGORY, 5, "The log message is a pathname");
648: public static final SVNErrorCode CL_COMMIT_IN_ADDED_DIR = new SVNErrorCode(
649: CL_CATEGORY, 6,
650: "Committing in directory scheduled for addition");
651: public static final SVNErrorCode CL_NO_EXTERNAL_EDITOR = new SVNErrorCode(
652: CL_CATEGORY, 7, "No external editor available");
653: public static final SVNErrorCode CL_BAD_LOG_MESSAGE = new SVNErrorCode(
654: CL_CATEGORY, 8,
655: "Something is wrong with the log message's contents");
656: public static final SVNErrorCode CL_UNNECESSARY_LOG_MESSAGE = new SVNErrorCode(
657: CL_CATEGORY, 9,
658: "A log message was given where none was necessary");
659: }
|