Skip to content

Commit

Permalink
improve error msg of rcl_expand_topic_name (ros2#1076)
Browse files Browse the repository at this point in the history
If `RCL_RET_TOPIC_NAME_INVALID` is returned the error msg
is obtained by calling `rcl_topic_name_validation_result_string`
to ease debugging invalid topics.

Signed-off-by: Eric Wolf <ewolf@advitec.de>
  • Loading branch information
Deric-W authored and danthony06 committed Jun 14, 2023
1 parent 0516372 commit 386d0b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rcl/src/rcl/expand_topic_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ rcl_expand_topic_name(
return ret;
}
if (validation_result != RCL_TOPIC_NAME_VALID) {
RCL_SET_ERROR_MSG("topic name is invalid");
RCL_SET_ERROR_MSG(rcl_topic_name_validation_result_string(validation_result));
return RCL_RET_TOPIC_NAME_INVALID;
}
// validate the node name
Expand Down

0 comments on commit 386d0b6

Please sign in to comment.