Exception for libcurl errors.
More...
#include <mastodonpp/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...
|
|
| CURLException (string message) |
| Constructor with message. 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/3]
mastodonpp::CURLException::CURLException |
( |
const CURLcode & |
error, |
|
|
string |
message |
|
) |
| |
|
explicit |
Constructor with error code and message.
- Since
- 0.1.0
29 , _message{move(message)}
const CURLcode error_code
The error code returned by libcurl.
Definition: exceptions.hpp:73
◆ CURLException() [2/3]
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)}
◆ CURLException() [3/3]
mastodonpp::CURLException::CURLException |
( |
string |
message | ) |
|
|
explicit |
Constructor with message.
- Since
- 0.1.0
41 , _message{move(message)}
◆ what()
const char * mastodonpp::CURLException::what |
( |
| ) |
const |
|
overridenoexcept |
Returns the error code, message and error buffer.
- Since
- 0.1.0
46 static string error_string{
"libCURL error: "};
51 error_string += _message;
52 if (!_error_buffer.empty())
54 error_string +=
" [" + _error_buffer +
"]";
56 return error_string.c_str();
◆ error_code
const CURLcode mastodonpp::CURLException::error_code |
The error code returned by libcurl.
For more information consult libcurl-errors(3).
- Since
- 0.1.0
The documentation for this class was generated from the following files: