diff options
author | Johan Abildskov <randomsort@gmail.com> | 2018-08-20 10:08:30 +0200 |
---|---|---|
committer | Johan Abildskov <randomsort@gmail.com> | 2018-08-20 10:12:00 +0200 |
commit | 3602b57328819d381d46e7e5f37ccea3e9479f01 (patch) | |
tree | 5858fe1d7901ee05cd69ea73b097adab26e860b5 | |
parent | 5b0258add926c9d17c88984d4aaf085e2a091919 (diff) | |
download | libgit2-3602b57328819d381d46e7e5f37ccea3e9479f01.tar.gz |
Document giterr_last() use only after error. #4772
-rw-r--r-- | docs/error-handling.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/error-handling.md b/docs/error-handling.md index 719244d2f..d769bca1d 100644 --- a/docs/error-handling.md +++ b/docs/error-handling.md @@ -117,6 +117,8 @@ 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. 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 |