diff options
author | Vicent Marti <tanoku@gmail.com> | 2010-11-05 03:20:17 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2010-11-05 03:20:17 +0200 |
commit | 1795f87952a68155a618523799f70473483c7265 (patch) | |
tree | 239c2fef7674cc0407523be0a250b563361efc6b /src/git/common.h | |
parent | 1714826fa08ad8612b720c8fdea636a4fc49c480 (diff) | |
download | libgit2-1795f87952a68155a618523799f70473483c7265.tar.gz |
Improve error handling
All initialization functions now return error codes instead of pointers.
Error codes are now properly propagated on most functions. Several new
and more specific error codes have been added in common.h
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/git/common.h')
-rw-r--r-- | src/git/common.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/git/common.h b/src/git/common.h index 35408413d..82f08ac5d 100644 --- a/src/git/common.h +++ b/src/git/common.h @@ -84,6 +84,28 @@ /** The specified object has its data corrupted */ #define GIT_EOBJCORRUPTED (GIT_ERROR - 6) +/** The specified repository is invalid */ +#define GIT_ENOTAREPO (GIT_ERROR - 7) + +/** The object type is invalid or doesn't match */ +#define GIT_EINVALIDTYPE (GIT_ERROR - 8) + +/** The object cannot be written that because it's missing internal data */ +#define GIT_EMISSINGOBJDATA (GIT_ERROR - 9) + +/** The packfile for the ODB is corrupted */ +#define GIT_EPACKCORRUPTED (GIT_ERROR - 10) + +/** Failed to adquire or release a file lock */ +#define GIT_EFLOCKFAIL (GIT_ERROR - 11) + +/** The Z library failed to inflate/deflate an object's data */ +#define GIT_EZLIB (GIT_ERROR - 12) + +/** The queried object is currently busy */ +#define GIT_EBUSY (GIT_ERROR - 13) + + GIT_BEGIN_DECL /** |