xref: /curl/docs/libcurl/curl_share_strerror.md (revision 5a488251)
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
14Added-in: 7.12.0
15---
16
17# NAME
18
19curl_share_strerror - return string describing error code
20
21# SYNOPSIS
22
23~~~c
24#include <curl/curl.h>
25
26const char *curl_share_strerror(CURLSHcode errornum);
27~~~
28
29# DESCRIPTION
30
31The curl_share_strerror(3) function returns a string describing the
32*CURLSHcode* error code passed in the argument *errornum*.
33
34# %PROTOCOLS%
35
36# EXAMPLE
37
38~~~c
39int main(void)
40{
41  CURLSHcode sh;
42  CURLSH *share = curl_share_init();
43  sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
44  if(sh)
45    printf("Error: %s\n", curl_share_strerror(sh));
46}
47~~~
48
49# %AVAILABILITY%
50
51# RETURN VALUE
52
53A pointer to a null-terminated string.
54