Make error message of CURLException public.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
fe5707b610
commit
3a71a14f56
|
@ -247,7 +247,7 @@ const char *CURLException::what() const noexcept
|
|||
// NOTE: The string has to be static, or it'll vanish before it can be
|
||||
// used. Couldn't find good documentation on that.
|
||||
static string error_string;
|
||||
error_string = _error_message;
|
||||
error_string = error_message;
|
||||
if (!error_string.empty())
|
||||
{
|
||||
error_string = " – " + error_string;
|
||||
|
|
|
@ -243,10 +243,11 @@ public:
|
|||
*/
|
||||
explicit CURLException(const CURLcode code, string_view error_buffer)
|
||||
: error_code{code}
|
||||
, _error_message{error_buffer}
|
||||
, error_message{error_buffer}
|
||||
{}
|
||||
|
||||
const CURLcode error_code; //!< Error code from libcurl.
|
||||
const CURLcode error_code; //!< Error code from libcurl.
|
||||
const string error_message; //!< The error message.
|
||||
|
||||
/*!
|
||||
* @brief Error message.
|
||||
|
@ -254,9 +255,6 @@ public:
|
|||
* @since 0.1.0
|
||||
*/
|
||||
[[nodiscard]] const char *what() const noexcept override;
|
||||
|
||||
private:
|
||||
string _error_message;
|
||||
};
|
||||
|
||||
} // namespace curl_wrapper
|
||||
|
|
Loading…
Reference in New Issue