diff --git a/main.cpp b/main.cpp index 861173e..0a2e78e 100644 --- a/main.cpp +++ b/main.cpp @@ -46,9 +46,14 @@ main(int argc, char* argv[]) CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, argv[1]); res = curl_easy_perform(curl); + if (res != 0) + { + cout << curl_easy_strerror(res); + exit(1); + } curl_easy_cleanup(curl); } - return 0; + return 0; } curl_global_init(CURL_GLOBAL_ALL);