]>
git.proxmox.com Git - libgit2.git/blob - include/git2/errors.h
2 * Copyright (C) 2009-2011 the libgit2 contributors
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_git_errors_h__
8 #define INCLUDE_git_errors_h__
14 * @brief Git error handling routines and variables
24 /** Input was not a properly formatted Git object id. */
27 /** Input does not exist in the scope searched. */
30 /** Not enough space available. */
33 /** Consult the OS error information. */
36 /** The specified object is of invalid type */
39 /** The specified repository is invalid */
42 /** The object type is invalid or doesn't match */
43 GIT_EINVALIDTYPE
= -8,
45 /** The object cannot be written because it's missing internal data */
46 GIT_EMISSINGOBJDATA
= -9,
48 /** The packfile for the ODB is corrupted */
49 GIT_EPACKCORRUPTED
= -10,
51 /** Failed to acquire or release a file lock */
54 /** The Z library failed to inflate/deflate an object's data */
57 /** The queried object is currently busy */
60 /** The index file is not backed up by an existing repository */
63 /** The name of the reference is not valid */
64 GIT_EINVALIDREFNAME
= -15,
66 /** The specified reference has its data corrupted */
67 GIT_EREFCORRUPTED
= -16,
69 /** The specified symbolic reference is too deeply nested */
70 GIT_ETOONESTEDSYMREF
= -17,
72 /** The pack-refs file is either corrupted or its format is not currently supported */
73 GIT_EPACKEDREFSCORRUPTED
= -18,
75 /** The path is invalid */
76 GIT_EINVALIDPATH
= -19,
78 /** The revision walker is empty; there are no more commits left to iterate */
79 GIT_EREVWALKOVER
= -20,
81 /** The state of the reference is not valid */
82 GIT_EINVALIDREFSTATE
= -21,
84 /** This feature has not been implemented yet */
85 GIT_ENOTIMPLEMENTED
= -22,
87 /** A reference with this name already exists */
90 /** The given integer literal is too large to be parsed */
93 /** The given literal is not a valid number */
96 /** Streaming error */
99 /** invalid arguments to function */
100 GIT_EINVALIDARGS
= -27,
102 /** The specified object has its data corrupted */
103 GIT_EOBJCORRUPTED
= -28,
105 /** The given short oid is ambiguous */
106 GIT_EAMBIGUOUSOIDPREFIX
= -29,
108 /** Skip and passthrough the given ODB backend */
109 GIT_EPASSTHROUGH
= -30,
111 /** The path pattern and string did not match */
114 /** The buffer is too short to satisfy the request */
115 GIT_ESHORTBUFFER
= -32,
119 * Return a detailed error string with the latest error
120 * that occurred in the library.
121 * @return a string explaining the error
123 GIT_EXTERN(const char *) git_lasterror(void);
126 * strerror() for the Git library
128 * Get a string description for a given error code.
129 * NOTE: This method will be eventually deprecated in favor
130 * of the new `git_lasterror`.
132 * @param num The error code to explain
133 * @return a string explaining the error code
135 GIT_EXTERN(const char *) git_strerror(int num
);
138 * Clear the latest library error
140 GIT_EXTERN(void) git_clearerror(void);