From 7c7ff7d11e2d22f7b9c7f8152f5c58dde37ac207 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Mon, 19 Mar 2012 16:10:11 -0700 Subject: Migrate index, oid, and utils to new errors This includes a few cleanups that came up while converting these files. This commit introduces a could new git error classes, including the catchall class: GITERR_INVALID which I'm using as the class for invalid and out of range values which are detected at too low a level of library to use a higher level classification. For example, an overflow error in parsing an integer or a bad letter in parsing an OID string would generate an error in this class. --- include/git2/errors.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/git2/errors.h') diff --git a/include/git2/errors.h b/include/git2/errors.h index 5a4e540e1..d71df59a2 100644 --- a/include/git2/errors.h +++ b/include/git2/errors.h @@ -123,12 +123,14 @@ typedef struct { typedef enum { GITERR_NOMEMORY, GITERR_OS, + GITERR_INVALID, GITERR_REFERENCE, GITERR_ZLIB, GITERR_REPOSITORY, GITERR_CONFIG, GITERR_REGEX, - GITERR_ODB + GITERR_ODB, + GITERR_INDEX } git_error_class; /** -- cgit v1.2.1