mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 00:50:49 +02:00
* Add error check
This commit is contained in:
parent
99e449eaa1
commit
bfe3afbc62
@ -44,7 +44,8 @@ begin
|
|||||||
curl_easy_setopt(hCurl,CURLOPT_URL,[URL]);
|
curl_easy_setopt(hCurl,CURLOPT_URL,[URL]);
|
||||||
curl_easy_setopt(hCurl,CURLOPT_WRITEFUNCTION,[@DoWrite]);
|
curl_easy_setopt(hCurl,CURLOPT_WRITEFUNCTION,[@DoWrite]);
|
||||||
curl_easy_setopt(hCurl,CURLOPT_WRITEDATA,[Pointer(F)]);
|
curl_easy_setopt(hCurl,CURLOPT_WRITEDATA,[Pointer(F)]);
|
||||||
curl_easy_perform(hCurl);
|
if curl_easy_perform(hCurl)<>CURLE_OK then
|
||||||
|
Writeln(StdErr,'Failed to get URL');
|
||||||
curl_easy_cleanup(hCurl);
|
curl_easy_cleanup(hCurl);
|
||||||
end;
|
end;
|
||||||
Finally
|
Finally
|
||||||
|
Loading…
Reference in New Issue
Block a user