From 29c0c8ce3dc10f74b1ef440d2b14b02861beaff0 Mon Sep 17 00:00:00 2001 From: "Alice (SemenovIA)" Date: Mon, 28 Oct 2024 04:00:32 +0300 Subject: [PATCH] code: error correction --- project/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/project/main.cpp b/project/main.cpp index af13205..387f577 100644 --- a/project/main.cpp +++ b/project/main.cpp @@ -50,6 +50,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) { + curl_easy_strerror(res); + exit(1); + } curl_easy_cleanup(curl); } }