xref: /curl/docs/libcurl/curl_share_strerror.md (revision e3fe0200)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: curl_share_strerror
5Section: 3
6Source: libcurl
7See-also:
8  - curl_easy_strerror (3)
9  - curl_multi_strerror (3)
10  - curl_url_strerror (3)
11  - libcurl-errors (3)
12Protocol:
13  - All
14---
15
16# NAME
17
18curl_share_strerror - return string describing error code
19
20# SYNOPSIS
21
22~~~c
23#include <curl/curl.h>
24
25const char *curl_share_strerror(CURLSHcode errornum);
26~~~
27
28# DESCRIPTION
29
30The curl_share_strerror(3) function returns a string describing the
31*CURLSHcode* error code passed in the argument *errornum*.
32
33# EXAMPLE
34
35~~~c
36int main(void)
37{
38  CURLSHcode sh;
39  CURLSH *share = curl_share_init();
40  sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
41  if(sh)
42    printf("Error: %s\n", curl_share_strerror(sh));
43}
44~~~
45
46# AVAILABILITY
47
48This function was added in libcurl 7.12.0
49
50# RETURN VALUE
51
52A pointer to a null-terminated string.
53