Skip to content

Commit

Permalink
validation result should be used to print the error message. (#1077)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <[email protected]>
  • Loading branch information
fujitatomoya committed Jun 13, 2023
1 parent a4b40f1 commit 0227978
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rcl/src/rcl/expand_topic_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ rcl_expand_topic_name(
return rcl_convert_rmw_ret_to_rcl_ret(rmw_ret);
}
if (validation_result != RMW_NODE_NAME_VALID) {
RCL_SET_ERROR_MSG("node name is invalid");
RCL_SET_ERROR_MSG(rmw_node_name_validation_result_string(validation_result));
return RCL_RET_NODE_INVALID_NAME;
}
// validate the namespace
Expand All @@ -91,7 +91,7 @@ rcl_expand_topic_name(
return rcl_convert_rmw_ret_to_rcl_ret(rmw_ret);
}
if (validation_result != RMW_NODE_NAME_VALID) {
RCL_SET_ERROR_MSG("node namespace is invalid");
RCL_SET_ERROR_MSG(rmw_namespace_validation_result_string(validation_result));
return RCL_RET_NODE_INVALID_NAMESPACE;
}
// check if the topic has substitutions to be made
Expand Down

0 comments on commit 0227978

Please sign in to comment.