summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-05-09 21:58:26 +0300
committerVicent Marti <tanoku@gmail.com>2011-05-09 21:58:26 +0300
commit5711ca93d13b74767788c0d7d68fb948e0f9e170 (patch)
tree4406a254cd862f256dd46295ca4032bfd9f5a25b /include/git2
parentcd2cc2dc363770d03a9d77206b97d0ee70244cad (diff)
parentfa59f18d0ddbbb98d45e33934fb0efc3e2bf1557 (diff)
downloadlibgit2-5711ca93d13b74767788c0d7d68fb948e0f9e170.tar.gz
Merge branch 'error-handling' into development
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/common.h6
-rw-r--r--include/git2/errors.h8
-rw-r--r--include/git2/thread-utils.h1
3 files changed, 11 insertions, 4 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index 22c7cc466..2aae648fb 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -170,6 +170,12 @@
/** The given literal is not a valid number */
#define GIT_ENOTNUM (GIT_ERROR - 25)
+/** Streaming error */
+#define GIT_ESTREAM (GIT_ERROR - 26)
+
+/** invalid arguments to function */
+#define GIT_EINVALIDARGS (GIT_ERROR - 27)
+
GIT_BEGIN_DECL
typedef struct {
diff --git a/include/git2/errors.h b/include/git2/errors.h
index 627e67c70..fde0dc73d 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -34,11 +34,11 @@
GIT_BEGIN_DECL
/**
- * strerror() for the Git library
- * @param num The error code to explain
- * @return a string explaining the error code
+ * Return a detailed error string with the latest error
+ * that occurred in the library.
+ * @return a string explaining the error
*/
-GIT_EXTERN(const char *) git_strerror(int num);
+GIT_EXTERN(const char *) git_lasterror(void);
/** @} */
GIT_END_DECL
diff --git a/include/git2/thread-utils.h b/include/git2/thread-utils.h
index fb8644b93..e26876bea 100644
--- a/include/git2/thread-utils.h
+++ b/include/git2/thread-utils.h
@@ -35,6 +35,7 @@
#if defined(__APPLE__) && defined(__MACH__)
# undef GIT_TLS
+# define GIT_TLS
#elif defined(__GNUC__) || \
defined(__SUNPRO_C) || \