![]() |
ImFusion SDK 4.3
|
#include <RoboticsPlugin/Include/ImFusion/Robotics/Error.h>
Error that wraps any C++ exception. More...
Error that wraps any C++ exception.
This class can be used to catch any C++ exception (not just types inheriting from std::exception but also primitive types) and convert them to a Utils::Error, so that they compose nicely.
Usage example:
Public Member Functions | |
ErrorException (std::exception_ptr ex) | |
std::string | domain () const override |
int | id () const override |
Retrieves the unique identifier for the error. | |
std::string | message () const override |
![]() | |
~ErrorInheritanceHelper () override=default | |
Override destructor. | |
ErrorInheritanceHelper (const ErrorInterface &ei) | |
std::unique_ptr< ErrorException > | clone () const & |
Creates a copy of the current instance. | |
![]() | |
virtual void | handle () |
Error handling strategy, allows the user to define a task on the constructor of ErrorFrontEnd. | |
template<typename T> | |
operator Utils::Expected< T, ErrorFrontEnd > () const & | |
Template method for casting to std::expected<T, ErrorFrontEnd>. | |
std::unique_ptr< ErrorInterface > | clone () const & |
Creates a copy of the current instance. | |
bool | operator== (const ErrorFrontEnd &other) const |
Compares the id and the domain. | |
bool | operator== (const ErrorInterface &other) const |
Compares the id and the domain. | |
virtual ErrorComposition | operator| (const ErrorInterface &input) const |
Composition operator. | |
|
nodiscardoverridevirtual |
Implements ErrorInterface.
|
nodiscardoverridevirtual |
|
nodiscardoverridevirtual |
Implements ErrorInterface.