#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:
Robotics::Expected<int> myFunction() {
try
{
int res = compute();
switch (res)
{
case -1:
throw 5;
case -2:
default:
return res;
}
}
catch (...)
{
}
};
T current_exception(T... args)
◆ domain()
- Returns
- String representing the category
◆ id()
| int ErrorException::id |
( |
| ) |
const |
|
nodiscardoverride |
Retrieves the unique identifier for the error.
- Returns
- The error ID.
◆ message()
- Returns
- Human-readable description of the error.
The documentation for this class was generated from the following file:
- RoboticsPlugin/Include/ImFusion/Robotics/Error.h