dynamic_message_introspection icon indicating copy to clipboard operation
dynamic_message_introspection copied to clipboard

Return error on invalid YAML fields

Open marioprats opened this issue 2 years ago • 0 comments

This change throws an std::runtime exception if a YAML has fields that don't correspond to the message, which makes it match the behavior described in the public documentation of yaml_to_rosmsg:

It is an error for the YAML representation to contain a field that is not in the ROS message.

However, an error wasn't returned. This PR makes the function throw an exception in that case, and adds a test case.

marioprats avatar Nov 22 '23 11:11 marioprats