logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

curl_easy_strerror - return string describing error code

Availability

Added in curl 7.12.0

Description

The curl_easy_strerror(3) function returns a string describing the CURLcode error code passed in the argument errornum. Typically applications also appreciate CURLOPT_ERRORBUFFER(3) for more specific error descriptions generated at runtime.

Example

int main(void) { CURL *curl = curl_easy_init(); if(curl) { CURLcode res; /* set options */ /* Perform the entire transfer */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); } }

Name

curl_easy_strerror - return string describing error code

Protocols

This functionality affects all supported protocols

Return Value

A pointer to a null-terminated string.

See Also

curl_multi_strerror(3), curl_share_strerror(3), curl_url_strerror(3), libcurl-errors(3) libcurl 2025-06-16 curl_easy_strerror(3)

Synopsis

#include <curl/curl.h> const char *curl_easy_strerror(CURLcode errornum);

See Also