Skip to content

Commit

Permalink
Output warning is ns remapping is invalid but starts with /
Browse files Browse the repository at this point in the history
  • Loading branch information
dhood committed Jun 2, 2018
1 parent ba4ee35 commit d838bd1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rcl/src/rcl/arguments.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,20 @@ _rcl_parse_remap_namespace_replacement(
ret = _rcl_parse_remap_fully_qualified_namespace(lex_lookahead);
if (RCL_RET_OK != ret) {
if (RCL_RET_INVALID_REMAP_RULE == ret) {
// The name didn't start with a leading forward slash
RCUTILS_LOG_WARN_NAMED(
ROS_PACKAGE_NAME, "Namespace not remapped to a fully qualified name (found: %s)", ns_start);
}
return ret;
}
// There should be nothing left
ret = rcl_lexer_lookahead2_expect(lex_lookahead, RCL_LEXEME_EOF, NULL, NULL);
if (RCL_RET_OK != ret) {
// The name must have started with a leading forward slash but had an otherwise invalid format
RCUTILS_LOG_WARN_NAMED(
ROS_PACKAGE_NAME, "Namespace not remapped to a fully qualified name (found: %s)", ns_start);
return ret;
}

// Copy namespace into rule
const char * ns_end = rcl_lexer_lookahead2_get_text(lex_lookahead);
Expand Down

0 comments on commit d838bd1

Please sign in to comment.