MCPcopy Create free account
hub / github.com/JosephP91/curlcpp / curl_share_exception

Class curl_share_exception

include/curl_exception.h:198–220  ·  view source on GitHub ↗

* Derived class used to represent an error condition returned by the share * interface functions. */

Source from the content-addressed store, hash-verified

196 * interface functions.
197 */
198 class curl_share_exception : public curl_exception {
199 public:
200 /**
201 * This constructor enables setting a custom error message and the method name where
202 * the exception has been thrown.
203 */
204 curl_share_exception(const std::string &error, const std::string &method) :
205 curl_exception(error,method), code(CURLSHE_OK) {}
206 /**
207 * The constructor will transform a CURLSHcode error in a proper error message.
208 */
209 curl_share_exception(const CURLSHcode code, const std::string &method) :
210 curl_exception(curl_share_strerror(code),method), code(code) {}
211
212 /**
213 * Returns the error code if there is one. Returns CURLE_OK if none has been set.
214 */
215 inline CURLSHcode get_code() const {
216 return code;
217 }
218 private:
219 CURLSHcode code;
220 };
221}
222
223#endif /* defined(CURLCPP_CURL_EXCEPTION_H) */

Callers 2

initialize_curl_shareMethod · 0.85
addMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected