Skip to content

Improve error message when parameter value is missing#3093

Open
yadnyeshwar wants to merge 3 commits intoros2:rollingfrom
yadnyeshwar:improve-parameter-error-message
Open

Improve error message when parameter value is missing#3093
yadnyeshwar wants to merge 3 commits intoros2:rollingfrom
yadnyeshwar:improve-parameter-error-message

Conversation

@yadnyeshwar
Copy link

Description

This pull request improves the error message thrown when a parameter value is missing during parameter value conversion in parameter_map.cpp.

Previously, the exception message was:

"No parameter value set"

This message did not clearly indicate the source of the problem.
The updated message clarifies that the issue originates from the underlying rcl parameter structure when no value is present.

This improves debugging and provides clearer feedback when invalid parameter configurations are encountered.

Fixes # (issue)

Is this user-facing behavior change?

Yes.
The error message shown when a parameter value is missing has been made more descriptive to improve debugging and clarity for users.

Did you use Generative AI?

No.

Additional Information

This change only updates the exception message and does not modify any logic or behavior in parameter parsing.

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

although i think current message is fine enough, i guess that is okay to change the exception message as suggested.

can you also address https://build.ros2.org/job/Rpr__rclcpp__ubuntu_noble_amd64/919/?

Signed-off-by: yadnyeshwar <yadnyeshwarasakhare@gmail.com>
@yadnyeshwar yadnyeshwar force-pushed the improve-parameter-error-message branch from 6f5c173 to 5bf6790 Compare March 12, 2026 09:16
Signed-off-by: yadnyeshwar <yadnyeshwarasakhare@gmail.com>
Signed-off-by: yadnyeshwar <yadnyeshwarasakhare@gmail.com>
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.

2 participants