diff options
author | Guenter Knauf <lists@gknw.net> | 2012-07-04 17:03:52 +0200 |
---|---|---|
committer | Guenter Knauf <lists@gknw.net> | 2012-07-04 17:03:52 +0200 |
commit | a3dbbcfd2ac7ab8f597e26e76935726279d3fa0c (patch) | |
tree | 10019b38cc070abd7e9b781761b0e9f27f6ffeea /docs/examples/httpput.c | |
parent | 6388ac7dc1f531f4f94616e8e0a46a0cecde8315 (diff) | |
download | gnurl-a3dbbcfd2ac7ab8f597e26e76935726279d3fa0c.tar.gz gnurl-a3dbbcfd2ac7ab8f597e26e76935726279d3fa0c.tar.bz2 gnurl-a3dbbcfd2ac7ab8f597e26e76935726279d3fa0c.zip |
Added error checking for samples.
Diffstat (limited to 'docs/examples/httpput.c')
-rw-r--r-- | docs/examples/httpput.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c index f04618f96..fbbca9448 100644 --- a/docs/examples/httpput.c +++ b/docs/examples/httpput.c @@ -110,6 +110,10 @@ int main(int argc, char **argv) /* Now run off and do what you've been told! */ 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); |