diff options
Diffstat (limited to 'docs/examples/debug.c')
-rw-r--r-- | docs/examples/debug.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/examples/debug.c b/docs/examples/debug.c index 270b497af..3852bf2cc 100644 --- a/docs/examples/debug.c +++ b/docs/examples/debug.c @@ -132,6 +132,10 @@ int main(void) curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); /* always cleanup */ curl_easy_cleanup(curl); |