summaryrefslogtreecommitdiff
path: root/include/git2/errors.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-05-11 00:35:05 +0300
committerVicent Marti <tanoku@gmail.com>2011-05-11 00:35:40 +0300
commitf4a936b56a6bb0cbe6d5f4b5c7c73066ad2f3197 (patch)
tree82c50947ec6824564495f52fdf68fcd6113c3a73 /include/git2/errors.h
parent86b74ea0ab267eb195f39fb5270ad513c4d4d3c5 (diff)
downloadlibgit2-f4a936b56a6bb0cbe6d5f4b5c7c73066ad2f3197.tar.gz
Bring back `git_strerror`
We cannot totally deprecate this until the new error handling mechanisms are all in place.
Diffstat (limited to 'include/git2/errors.h')
-rw-r--r--include/git2/errors.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h
index fde0dc73d..47b0e240f 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -40,6 +40,18 @@ GIT_BEGIN_DECL
*/
GIT_EXTERN(const char *) git_lasterror(void);
+/**
+ * strerror() for the Git library
+ *
+ * Get a string description for a given error code.
+ * NOTE: This method will be eventually deprecated in favor
+ * of the new `git_lasterror`.
+ *
+ * @param num The error code to explain
+ * @return a string explaining the error code
+ */
+GIT_EXTERN(const char *) git_strerror(int num);
+
/** @} */
GIT_END_DECL
#endif