Bug report
Required Info:
- Operating System:
- Installation type:
- Version or commit hash:
- 9.2.0-1focal.20220211.031858
- DDS implementation:
- Client library (if applicable):
Steps to reproduce issue
Call rclcpp::ParameterEventHandler::get_parameter_from_event(const rcl_interfaces::msg::ParameterEvent & event, const std::string parameter_name, const std::string node_name) for a non-existent parameter.
Expected behavior
According to
|
* The user is responsible to check if the returned parameter has been properly assigned. |
|
* By default, if the requested parameter is not found in the event, the returned parameter |
|
* has parameter value of type rclcpp::PARAMETER_NOT_SET. |
, if the requested parameter is not found, a not-set Parameter is returned.
Actual behavior
The function throws an exception and does not return normally. See
|
if (!get_parameter_from_event(event, p, parameter_name, node_name)) { |
|
throw std::runtime_error( |
|
"Parameter '" + parameter_name + "' of node '" + node_name + |
|
"' is not part of parameter event"); |
|
} |
.
Additional information
None
Bug report
Required Info:
Steps to reproduce issue
Call
rclcpp::ParameterEventHandler::get_parameter_from_event(const rcl_interfaces::msg::ParameterEvent & event, const std::string parameter_name, const std::string node_name)for a non-existent parameter.Expected behavior
According to
rclcpp/rclcpp/include/rclcpp/parameter_event_handler.hpp
Lines 263 to 265 in c24e485
Actual behavior
The function throws an exception and does not return normally. See
rclcpp/rclcpp/src/rclcpp/parameter_event_handler.cpp
Lines 135 to 139 in c24e485
Additional information
None