From 2e567b19d33fd83d757a60d87f7cf5722964e005 Mon Sep 17 00:00:00 2001 From: Jacob Perron Date: Tue, 4 Jun 2019 17:58:50 -0700 Subject: [PATCH] Log warning when remapping to an invalid node name Similar to the warnings when remapping to invalid namespaces, this better communicates failures to the user. Resolves #449 Signed-off-by: Jacob Perron --- rcl/src/rcl/arguments.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rcl/src/rcl/arguments.c b/rcl/src/rcl/arguments.c index ad30ca7d1..12f157af6 100644 --- a/rcl/src/rcl/arguments.c +++ b/rcl/src/rcl/arguments.c @@ -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) {