Base class of every error raised by the SDK, so that catch (const common::Error&) handles them all.
More...
#include <errors.hpp>
|
| | Error (const std::string &what, std::string msg, std::optional< std::int64_t > code=std::nullopt) |
| const std::string & | msg () const noexcept |
| std::optional< std::int64_t > | code () const noexcept |
Base class of every error raised by the SDK, so that catch (const common::Error&) handles them all.
what() returns the formatted, human readable message; msg() and code() give the raw server (or client) message and the Binance error code, when one was returned.
◆ Error()
| binance::common::Error::Error |
( |
const std::string & | what, |
|
|
std::string | msg, |
|
|
std::optional< std::int64_t > | code = std::nullopt ) |
◆ msg()
| const std::string & binance::common::Error::msg |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ code()
| std::optional< std::int64_t > binance::common::Error::code |
( |
| ) |
const |
|
inlinenodiscardnoexcept |