diff options
author | Russell Belfer <rb@github.com> | 2013-12-03 16:45:39 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-12-11 10:57:49 -0800 |
commit | 96869a4edb2872934e0e167a726ab240f4270fea (patch) | |
tree | 2d770414acef2d1d45a609e004c0aa6fa56d06d7 /include/git2/errors.h | |
parent | 9f77b3f6f5ce6944ec49dfc666ef6b8df0af0c6b (diff) | |
download | libgit2-96869a4edb2872934e0e167a726ab240f4270fea.tar.gz |
Improve GIT_EUSER handling
This adds giterr_user_cancel to return GIT_EUSER and clear any
error message that is sitting around. As a result of using that
in places, we need to be more thorough with capturing errors that
happen inside a callback when used internally. To help with that,
this also adds giterr_capture and giterr_restore so that when we
internally use a foreach-type function that clears errors and
converts them to GIT_EUSER, it is easier to restore not just the
return value, but the actual error message text.
Diffstat (limited to 'include/git2/errors.h')
-rw-r--r-- | include/git2/errors.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h index f1a8ea1ae..c6076f3ab 100644 --- a/include/git2/errors.h +++ b/include/git2/errors.h @@ -8,7 +8,6 @@ #define INCLUDE_git_errors_h__ #include "common.h" -#include "buffer.h" /** * @file git2/errors.h @@ -91,7 +90,7 @@ GIT_EXTERN(void) giterr_clear(void); * Get the last error data and clear it. * * This copies the last error into the given `git_error` struct - * and returns 0 if the copy was successful, leaving the error + * and returns 0 if the copy was successful, leaving the error * cleared as if `giterr_clear` had been called. * * If there was no existing error in the library, -1 will be returned |