1251881Speter/*
2251881Speter * err.h : interface to routines for returning Berkeley DB errors
3251881Speter *
4251881Speter * ====================================================================
5251881Speter *    Licensed to the Apache Software Foundation (ASF) under one
6251881Speter *    or more contributor license agreements.  See the NOTICE file
7251881Speter *    distributed with this work for additional information
8251881Speter *    regarding copyright ownership.  The ASF licenses this file
9251881Speter *    to you under the Apache License, Version 2.0 (the
10251881Speter *    "License"); you may not use this file except in compliance
11251881Speter *    with the License.  You may obtain a copy of the License at
12251881Speter *
13251881Speter *      http://www.apache.org/licenses/LICENSE-2.0
14251881Speter *
15251881Speter *    Unless required by applicable law or agreed to in writing,
16251881Speter *    software distributed under the License is distributed on an
17251881Speter *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18251881Speter *    KIND, either express or implied.  See the License for the
19251881Speter *    specific language governing permissions and limitations
20251881Speter *    under the License.
21251881Speter * ====================================================================
22251881Speter */
23251881Speter
24251881Speter
25251881Speter
26251881Speter#ifndef SVN_LIBSVN_FS_ERR_H
27251881Speter#define SVN_LIBSVN_FS_ERR_H
28251881Speter
29251881Speter#include <apr_pools.h>
30251881Speter
31251881Speter#include "svn_error.h"
32251881Speter#include "svn_fs.h"
33251881Speter
34251881Speter#ifdef __cplusplus
35251881Speterextern "C" {
36251881Speter#endif /* __cplusplus */
37251881Speter
38251881Speter
39251881Speter
40251881Speter/* Building common error objects.  */
41251881Speter
42251881Speter
43251881Speter/* SVN_ERR_FS_CORRUPT: the REVISION skel of revision REV in FS is corrupt.  */
44251881Spetersvn_error_t *svn_fs_base__err_corrupt_fs_revision(svn_fs_t *fs,
45251881Speter                                                  svn_revnum_t rev);
46251881Speter
47251881Speter/* SVN_ERR_FS_ID_NOT_FOUND: something in FS refers to node revision
48251881Speter   ID, but that node revision doesn't exist.  */
49251881Spetersvn_error_t *svn_fs_base__err_dangling_id(svn_fs_t *fs,
50251881Speter                                          const svn_fs_id_t *id);
51251881Speter
52251881Speter/* SVN_ERR_FS_CORRUPT: something in FS refers to filesystem revision REV,
53251881Speter   but that filesystem revision doesn't exist.  */
54251881Spetersvn_error_t *svn_fs_base__err_dangling_rev(svn_fs_t *fs, svn_revnum_t rev);
55251881Speter
56251881Speter/* SVN_ERR_FS_CORRUPT: the entry for TXN in the `transactions' table
57251881Speter   is corrupt.  */
58251881Spetersvn_error_t *svn_fs_base__err_corrupt_txn(svn_fs_t *fs, const char *txn);
59251881Speter
60251881Speter/* SVN_ERR_FS_CORRUPT: the entry for COPY_ID in the `copies' table
61251881Speter   is corrupt.  */
62251881Spetersvn_error_t *svn_fs_base__err_corrupt_copy(svn_fs_t *fs, const char *copy_id);
63251881Speter
64251881Speter/* SVN_ERR_FS_NO_SUCH_TRANSACTION: there is no transaction named TXN in FS.  */
65251881Spetersvn_error_t *svn_fs_base__err_no_such_txn(svn_fs_t *fs, const char *txn);
66251881Speter
67251881Speter/* SVN_ERR_FS_TRANSACTION_NOT_MUTABLE: trying to change the
68251881Speter   unchangeable transaction named TXN in FS.  */
69251881Spetersvn_error_t *svn_fs_base__err_txn_not_mutable(svn_fs_t *fs, const char *txn);
70251881Speter
71251881Speter/* SVN_ERR_FS_NO_SUCH_COPY: there is no copy with id COPY_ID in FS.  */
72251881Spetersvn_error_t *svn_fs_base__err_no_such_copy(svn_fs_t *fs, const char *copy_id);
73251881Speter
74251881Speter/* SVN_ERR_FS_BAD_LOCK_TOKEN: LOCK_TOKEN does not refer to a lock in FS.  */
75251881Spetersvn_error_t *svn_fs_base__err_bad_lock_token(svn_fs_t *fs,
76251881Speter                                             const char *lock_token);
77251881Speter
78251881Speter/* SVN_ERR_FS_NO_LOCK_TOKEN: no lock token given for PATH in FS.  */
79251881Spetersvn_error_t *svn_fs_base__err_no_lock_token(svn_fs_t *fs, const char *path);
80251881Speter
81251881Speter/* SVN_ERR_FS_CORRUPT: a lock in `locks' table is corrupt.  */
82251881Spetersvn_error_t *svn_fs_base__err_corrupt_lock(svn_fs_t *fs,
83251881Speter                                           const char *lock_token);
84251881Speter
85251881Speter/* SVN_ERR_FS_NO_SUCH_NODE_ORIGIN: no recorded node origin for NODE_ID
86251881Speter   in FS.  */
87251881Spetersvn_error_t *svn_fs_base__err_no_such_node_origin(svn_fs_t *fs,
88251881Speter                                                  const char *node_id);
89251881Speter
90251881Speter/* SVN_ERR_FS_NO_SUCH_CHECKSUM_REP: no recorded rep key for CHECKSUM in FS. */
91251881Spetersvn_error_t *svn_fs_base__err_no_such_checksum_rep(svn_fs_t *fs,
92251881Speter                                                   svn_checksum_t *checksum);
93251881Speter
94251881Speter#ifdef __cplusplus
95251881Speter}
96251881Speter#endif /* __cplusplus */
97251881Speter
98251881Speter#endif /* SVN_LIBSVN_FS_ERR_H */
99