curl_url_strerror.3 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .TH curl_url_strerror 3 "21 Aug 2021" "libcurl" "libcurl"
  25. .SH NAME
  26. curl_url_strerror - return string describing error code
  27. .SH SYNOPSIS
  28. .nf
  29. .B #include <curl/curl.h>
  30. .BI "const char *curl_url_strerror(CURLUcode " errornum ");"
  31. .SH DESCRIPTION
  32. The curl_url_strerror() function returns a string describing the CURLUcode
  33. error code passed in the argument \fIerrornum\fP.
  34. .SH EXAMPLE
  35. .nf
  36. CURLUcode rc;
  37. CURLU *url = curl_url();
  38. rc = curl_url_set(url, CURLUPART_URL, "https://example.com", 0);
  39. if(rc)
  40. printf("URL error: %s\\n", curl_url_strerror(rc));
  41. curl_url_cleanup(url);
  42. .fi
  43. .SH AVAILABILITY
  44. Added in 7.80.0
  45. .SH RETURN VALUE
  46. A pointer to a null-terminated string.
  47. .SH "SEE ALSO"
  48. .BR libcurl-errors "(3), " curl_url_get "(3), " curl_url_set "(3), "
  49. .BR curl_easy_strerror "(3), " curl_multi_strerror "(3), "
  50. .BR curl_share_strerror "(3)"