Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return error on invalid YAML fields #25

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

marioprats
Copy link

@marioprats marioprats commented Nov 22, 2023

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 marioprats force-pushed the pr-error-on-invalid-fields branch from cb3284f to d8bf3b2 Compare November 22, 2023 11:18
@marioprats marioprats marked this pull request as ready for review November 22, 2023 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant