Log warning when remapping to an invalid node name (#454)

Similar to the warnings when remapping to invalid namespaces, this better communicates failures to the user.

Resolves #449

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This commit is contained in:
Jacob Perron 2019-06-05 12:26:16 -07:00 committed by GitHub
parent 8085c6adbf
commit 79b3ec1052
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -978,6 +978,9 @@ _rcl_parse_remap_nodename_replacement(
// new_node_name
ret = rcl_lexer_lookahead2_expect(lex_lookahead, RCL_LEXEME_TOKEN, &node_name, &length);
if (RCL_RET_WRONG_LEXEME == ret) {
node_name = rcl_lexer_lookahead2_get_text(lex_lookahead);
RCUTILS_LOG_WARN_NAMED(
ROS_PACKAGE_NAME, "Node name not remapped to invalid name: '%s'", node_name);
return RCL_RET_INVALID_REMAP_RULE;
}
if (RCL_RET_OK != ret) {