error.cpp
Go to the documentation of this file.
1 #include "cpr/error.h"
2 
3 #include <curl/curl.h>
4 
5 namespace cpr {
6 
7 ErrorCode Error::getErrorCodeForCurlError(std::int32_t curl_code) {
8  switch (curl_code) {
9  case CURLE_OK:
10  return ErrorCode::OK;
25 #if LIBCURL_VERSION_NUM < 0x073e00
28 #endif
29  case CURLE_GOT_NOTHING:
35  case CURLE_SEND_ERROR:
37  case CURLE_RECV_ERROR:
41  case CURLE_SSL_CIPHER:
43 #if LIBCURL_VERSION_NUM >= 0x073e00
46 #else
47  case CURLE_SSL_CACERT:
49 #endif
63  return ErrorCode::OK;
64  default:
66  }
67 }
68 
69 } // namespace cpr
ErrorCode
Definition: error.h:12
Definition: curl.h:455
Definition: auth.cpp:3
static ErrorCode getErrorCodeForCurlError(std::int32_t curl_code)
Definition: error.cpp:7


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:09