* Derived class represents an error condition returned by the multi * interface functions. */
| 168 | * interface functions. |
| 169 | */ |
| 170 | class curl_multi_exception : public curl_exception { |
| 171 | public: |
| 172 | /** |
| 173 | * This constructor enables setting a custom error message and the method name where |
| 174 | * the exception has been thrown. |
| 175 | */ |
| 176 | curl_multi_exception(const std::string &error, const std::string &method) : |
| 177 | curl_exception(error,method), code(CURLM_OK) {} |
| 178 | /** |
| 179 | * The constructor will transform a CURLMcode error to a proper error message. |
| 180 | */ |
| 181 | curl_multi_exception(const CURLMcode code, const std::string &method) : |
| 182 | curl_exception(curl_multi_strerror(code),method), code(code) {} |
| 183 | |
| 184 | /** |
| 185 | * Returns the error code if there is one. Returns CURLM_OK if none has been set. |
| 186 | */ |
| 187 | inline CURLMcode get_code() const { |
| 188 | return code; |
| 189 | } |
| 190 | private: |
| 191 | CURLMcode code; |
| 192 | }; |
| 193 | |
| 194 | /** |
| 195 | * Derived class used to represent an error condition returned by the share |
no outgoing calls
no test coverage detected