|
Astarte device API for C++ 0.8.1
Astarte device SDK for C++
|
Base error class representing any possible error from the Astarte device library. More...
#include <errors.hpp>
Inheritance diagram for AstarteDeviceSdk::AstarteErrorBase:Public Member Functions | |
| virtual | ~AstarteErrorBase () |
| Destructor for the Astarte error. | |
| auto | message () const -> const std::string & |
| Return the message encapsulated in the error. | |
| auto | type () const -> const std::string & |
| Return the type encapsulated in the error. | |
| auto | nested_error () const -> const std::shared_ptr< AstarteErrorBase > & |
| Return the nested error. | |
Protected Member Functions | |
| AstarteErrorBase (std::string_view type, std::string_view message) | |
| Constructor for the Astarte error. | |
| AstarteErrorBase (std::string_view type, std::string_view message, const AstarteErrorBase &other) | |
| Wrapping constructor for the Astarte error. | |
Base error class representing any possible error from the Astarte device library.
This type is intended to be used as the error type 'E' in std::expected<T, E>.
|
virtual |
Destructor for the Astarte error.
|
explicitprotected |
Constructor for the Astarte error.
| type | The name of the error type. |
| message | The error message. |
|
explicitprotected |
Wrapping constructor for the Astarte error.
| type | The name of the error type. |
| message | The error message. |
| other | An error to encapsulate within this base error. |
| auto AstarteDeviceSdk::AstarteErrorBase::message | ( | ) | const -> const std::string & |
Return the message encapsulated in the error.
| auto AstarteDeviceSdk::AstarteErrorBase::nested_error | ( | ) | const -> const std::shared_ptr< AstarteErrorBase > & |
Return the nested error.
| auto AstarteDeviceSdk::AstarteErrorBase::type | ( | ) | const -> const std::string & |
Return the type encapsulated in the error.