diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-03-09 19:55:50 +0100 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-03-09 20:09:22 +0100 |
commit | dda708e78f3c3f43d814d46c29ab9f2b9d47ed5c (patch) | |
tree | 60a6e01583c15209a42740a46e182ac7cbc893de /include/git2/errors.h | |
parent | 6af24ce31f43c3621f11720704a078058665bc3f (diff) | |
download | libgit2-dda708e78f3c3f43d814d46c29ab9f2b9d47ed5c.tar.gz |
error-handling: On-disk config file backend
Includes:
- Proper error reporting when encountering syntax errors in a
config file (file, line number, column).
- Rewritten `config_write`, now with 99% less goto-spaghetti
- Error state in `git_filebuf`: filebuf write functions no longer
need to be checked for error returns. If any of the writes performed
on a buffer fail, the last call to `git_filebuf_commit` or
`git_filebuf_hash` will fail accordingly and set the appropiate error
message. Baller!
Diffstat (limited to 'include/git2/errors.h')
-rw-r--r-- | include/git2/errors.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h index bc420d1d..085dd52f 100644 --- a/include/git2/errors.h +++ b/include/git2/errors.h @@ -127,14 +127,9 @@ typedef enum { GITERR_ZLIB, GITERR_REPOSITORY, GITERR_CONFIG, + GITERR_REGEX, } git_error_class; -#define GITERR_CHECK_ALLOC(ptr) if (ptr == NULL) { return -1; } - -GIT_EXTERN(void) giterr_set_oom(void); -GIT_EXTERN(void) giterr_set(int error_class, const char *string, ...); -GIT_EXTERN(void) giterr_clear(void); - /** * Return a detailed error string with the latest error * that occurred in the library. |