summaryrefslogtreecommitdiff
path: root/include/git2/errors.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/errors.h')
-rw-r--r--include/git2/errors.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h
index f617986e..54da869b 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -113,8 +113,23 @@ typedef enum {
/** The buffer is too short to satisfy the request */
GIT_ESHORTBUFFER = -32,
+} git_error_t;
+
+typedef struct {
+ char *message;
+ int klass;
} git_error;
+typedef enum {
+ GITERR_NOMEMORY,
+
+} git_error_class;
+
+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);
+
/**
* Return a detailed error string with the latest error
* that occurred in the library.