![]() |
ImFusion SDK 4.3
|
#include <RoboticsPlugin/Include/ImFusion/Robotics/Error.h>
Auxiliary type intended to implement a user defined specialization of ErrorInterface. More...
Auxiliary type intended to implement a user defined specialization of ErrorInterface.
It includes a generic clone()
method necessary for error composition.
Usage example:
Public Member Functions | |
~ErrorInheritanceHelper () override=default | |
Override destructor. | |
ErrorInheritanceHelper (const ErrorInterface &ei) | |
std::unique_ptr< T > | 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. | |
virtual std::string | domain () const =0 |
Returns the category to which the custom error implementation belongs. | |
virtual int | id () const =0 |
Retrieves the unique identifier for the error. | |
virtual std::string | message () const =0 |
Retrieves the error message. | |
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. | |
|
inlinenodiscard |
Creates a copy of the current instance.
This method performs a deep copy of the current instance and returns a new dynamically allocated instance that is a clone of this object.