* Derived class represents an error condition returned by the easy * interface functions. */
| 139 | * interface functions. |
| 140 | */ |
| 141 | class curl_easy_exception : public curl_exception { |
| 142 | public: |
| 143 | /** |
| 144 | * This constructor allows to specify a custom error message and the method name where |
| 145 | * the exception has been thrown. |
| 146 | */ |
| 147 | curl_easy_exception(const std::string &error, const std::string &method) : |
| 148 | curl_exception(error,method), code(CURLE_OK) {} |
| 149 | |
| 150 | /** |
| 151 | * The constructor will transform a CURLcode error in a proper error message. |
| 152 | */ |
| 153 | curl_easy_exception(const CURLcode &code, const std::string &method) : |
| 154 | curl_exception(curl_easy_strerror(code),method), code(code) {} |
| 155 | |
| 156 | /** |
| 157 | * Returns the error code if there is one. Returns CURLE_OK if none has been set. |
| 158 | */ |
| 159 | inline CURLcode get_code() const { |
| 160 | return code; |
| 161 | } |
| 162 | private: |
| 163 | CURLcode code; |
| 164 | }; |
| 165 | |
| 166 | /** |
| 167 | * Derived class represents an error condition returned by the multi |
no outgoing calls
no test coverage detected