summaryrefslogtreecommitdiff
path: root/include/git2/errors.h
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-02-17 00:13:34 +0100
committerVicent Martí <tanoku@gmail.com>2012-03-06 00:43:10 +0100
commit1a48112342932e9fcd45a1ff5935f1c9c53b83d1 (patch)
treefbb18cfe64e65025c6e1790972d1a106eea4cc54 /include/git2/errors.h
parent45d387ac78bcf3167d69b736d0b322717bc492d4 (diff)
downloadlibgit2-1a48112342932e9fcd45a1ff5935f1c9c53b83d1.tar.gz
error-handling: References
Yes, this is error handling solely for `refs.c`, but some of the abstractions leak all ofer the code base.
Diffstat (limited to 'include/git2/errors.h')
-rw-r--r--include/git2/errors.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h
index e3f5f4cb0..9b28093dc 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -122,16 +122,17 @@ typedef struct {
typedef enum {
GITERR_NOMEMORY,
+ GITERR_OS,
GITERR_REFERENCE,
+ GITERR_ZLIB,
} git_error_class;
-#define GITERR_CHECK_ALLOC(ptr, error) if (ptr == NULL) { giterr_set_oom(error); return -1 }
+#define GITERR_CHECK_ALLOC(ptr) if (ptr == NULL) { return -1; }
-GIT_EXTERN(void) giterr_set(git_error **error_out, int error_class, const char *string, ...);
-GIT_EXTERN(void) giterr_set_oom(git_error **error);
-GIT_EXTERN(void) giterr_free(git_error *error);
-GIT_EXTERN(void) giterr_clear(git_error **error);
+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