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

Этот коммит содержится в:
2024-05-22 14:58:40 +03:00
родитель e45343aa23
Коммит 8cfd8f2d8b

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

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