rclcpp
master
C++ ROS Client Library API
|
Classes | |
class | EventNotRegisteredError |
Thrown when an unregistered rclcpp::Event is encountered where a registered one was expected. More... | |
class | InvalidEventError |
Thrown when an invalid rclcpp::Event object or SharedPtr is encountered. More... | |
class | InvalidNamespaceError |
Thrown when a node namespace is invalid. More... | |
class | InvalidNodeError |
Thrown when a method is trying to use a node, but it is invalid. More... | |
class | InvalidNodeNameError |
Thrown when a node name is invalid. More... | |
class | InvalidParametersException |
Thrown if passed parameters are inconsistent or invalid. More... | |
class | InvalidParameterValueException |
Throwing if passed parameter value is invalid. More... | |
class | InvalidServiceNameError |
Thrown when a service name is invalid. More... | |
class | InvalidTopicNameError |
Thrown when a topic name is invalid. More... | |
class | NameValidationError |
Thrown when a any kind of name (node, namespace, topic, etc.) is invalid. More... | |
class | RCLBadAlloc |
Created when the ret is RCL_RET_BAD_ALLOC. More... | |
class | RCLError |
Created when the return code does not match one of the other specialized exceptions. More... | |
class | RCLErrorBase |
class | RCLInvalidArgument |
Created when the ret is RCL_RET_INVALID_ARGUMENT. More... | |
Functions | |
void | throw_from_rcl_error (rcl_ret_t ret, const std::string &prefix="", const rcl_error_state_t *error_state=nullptr, void(*reset_error)()=rcl_reset_error) |
Throw a C++ std::exception which was created based on an rcl error. More... | |
void rclcpp::exceptions::throw_from_rcl_error | ( | rcl_ret_t | ret, |
const std::string & | prefix = "" , |
||
const rcl_error_state_t * | error_state = nullptr , |
||
void(*)() | reset_error = rcl_reset_error |
||
) |
Throw a C++ std::exception which was created based on an rcl error.
Passing nullptr for reset_error is safe and will avoid calling any function to reset the error.
ret | the return code for the current error state |
prefix | string to prefix to the error if applicable (not all errors have custom messages) |
error_state | error state to create exception from, if nullptr rcl_get_error_state is used |
reset_error | function to be called before throwing which whill clear the error state |
std::invalid_argument | if ret is RCL_RET_OK |
std::runtime_error | if the rcl_get_error_state returns 0 |
RCLErrorBase | some child class exception based on ret |