summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2018-03-16 08:31:57 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-03-16 08:32:13 +0100
commit56631df7d4f801c48f9fa2a9c8a4b75112724004 (patch)
treece6231fc8d8c62ce6f24269079fc26f823940a9b
parentef60a7892558940c13956dedd12675ee9a3b4c64 (diff)
downloadcurl-bagder/clear-errorbuffer-add-handle.tar.gz
fixup CURLOPT_ERRORBUFFER.3 docsbagder/clear-errorbuffer-add-handle
[skip ci]
-rw-r--r--docs/libcurl/opts/CURLOPT_ERRORBUFFER.312
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3
index b64a2a394..71cce945b 100644
--- a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3
+++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3
@@ -28,8 +28,8 @@ CURLOPT_ERRORBUFFER \- set error buffer for error messages
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ERRORBUFFER, char *buf);
.SH DESCRIPTION
-Pass a char * to a buffer that the libcurl may store human readable error
-messages in on failures or problems. This may be more helpful than just the
+Pass a char * to a buffer that libcurl \fBmay\fP store human readable error
+messages on failures or problems. This may be more helpful than just the
return code from \fIcurl_easy_perform(3)\fP and related functions. The buffer
\fBmust be at least CURL_ERROR_SIZE bytes big\fP.
@@ -38,11 +38,13 @@ it. Failing to do so will cause very odd behavior or even crashes. libcurl
will need it until you call \fIcurl_easy_cleanup(3)\fP or you set the same
option again to use a different pointer.
+Do not rely on the contents of the buffer unless an error code was returned.
+Since 7.60.0 libcurl will initialize the contents of the error buffer to an
+empty string before performing the transfer. For earlier versions if an error
+code was returned but there was no error detail then the buffer is untouched.
+
Consider \fICURLOPT_VERBOSE(3)\fP and \fICURLOPT_DEBUGFUNCTION(3)\fP to better
debug and trace why errors happen.
-
-If the library does not return an error, the buffer may not have been
-touched. Do not rely on the contents in those cases.
.SH DEFAULT
NULL
.SH PROTOCOLS