code: обработка ошибок

Этот коммит содержится в:
2025-06-02 05:55:55 +03:00
родитель 3fd6304e7d
Коммит 8627043acf

Просмотреть файл

@@ -62,6 +62,10 @@ int main(int argc, char* argv[])
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
res = curl_easy_perform(curl);
if (res != CURLE_OK){
cerr << curl_easy_strerror(res);
exit(1);
}
curl_easy_cleanup(curl);
}
return 0;