diff options
author | Johan Abildskov <randomsort@gmail.com> | 2018-08-20 12:08:50 +0200 |
---|---|---|
committer | Johan Abildskov <randomsort@gmail.com> | 2018-08-20 12:08:50 +0200 |
commit | 73e31f6f704df4a51c40ea56231741d24e863ab4 (patch) | |
tree | 2e3999c03b91fcfd051cb007db1cf668db04ccb6 /docs | |
parent | 3602b57328819d381d46e7e5f37ccea3e9479f01 (diff) | |
download | libgit2-73e31f6f704df4a51c40ea56231741d24e863ab4.tar.gz |
Rephrase wording on giterr_last documentation
Diffstat (limited to 'docs')
-rw-r--r-- | docs/error-handling.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/error-handling.md b/docs/error-handling.md index d769bca1d..62fd55601 100644 --- a/docs/error-handling.md +++ b/docs/error-handling.md @@ -117,8 +117,11 @@ The public error API the last error. This may return NULL if no error has occurred. Otherwise this should return a `git_error` object indicating the class of error and the error message that was generated by the library. - Do not use this method unless you received an error, it will - lead to undefined behaviour. + Do not use this function unless the prior call to a libgit2 API + returned an error, as it can give misleading results. + libgit2's error strings are not cleared aggressively, + and this function may return an error string that reflects a prior error, + possibly even reflecting internal state. The last error is stored in thread-local storage when libgit2 is compiled with thread support, so you do not have to worry about another |