Exception for libcurl errors.
More...
#include <exceptions.hpp>
|
| CURLException (const CURLcode &error, string message) |
| Constructor with error code and message. More...
|
|
| CURLException (const CURLcode &error, string message, string error_buffer) |
| Constructor with error code, message and error buffer. More...
|
|
const char * | what () const noexcept override |
| Returns the error code, message and error buffer. More...
|
|
Exception for libcurl errors.
- Since
- 0.1.0
◆ CURLException() [1/2]
mastodonpp::CURLException::CURLException |
( |
const CURLcode & |
error, |
|
|
string |
message |
|
) |
| |
|
explicit |
Constructor with error code and message.
- Since
- 0.1.0
29 , _message{move(message)}
◆ CURLException() [2/2]
mastodonpp::CURLException::CURLException |
( |
const CURLcode & |
error, |
|
|
string |
message, |
|
|
string |
error_buffer |
|
) |
| |
|
explicit |
Constructor with error code, message and error buffer.
- Since
- 0.1.0
35 , _message{move(message)}
36 , _error_buffer{move(error_buffer)}
◆ what()
const char * mastodonpp::CURLException::what |
( |
| ) |
const |
|
overridenoexcept |
Returns the error code, message and error buffer.
- Since
- 0.1.0
41 static string error_string{
"libCURL error: " + to_string(
error_code)
43 if (!_error_buffer.empty())
45 error_string.append(
"[" + _error_buffer +
"]");
47 return error_string.c_str();
◆ error_code
const CURLcode mastodonpp::CURLException::error_code |
The error code returned by libcurl.
- Since
- 0.1.0
The documentation for this class was generated from the following files: