Skip to content
This repository was archived by the owner on Oct 7, 2021. It is now read-only.

Commit 152c751

Browse files
authored
Return specific error when not finding a node name (#281)
Signed-off-by: ivanpauno <[email protected]>
1 parent 2ef6b61 commit 152c751

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

rmw_opensplice_cpp/src/rmw_node_info_and_types.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ __get_key(
162162
return RMW_RET_OK;
163163
}
164164

165-
RMW_SET_ERROR_MSG("unable to match node_name/namespace with discovered nodes.");
166-
return RMW_RET_ERROR;
165+
RMW_SET_ERROR_MSG_WITH_FORMAT_STRING(
166+
"Node name not found: ns='%s', name='%s",
167+
node_namespace,
168+
node_name
169+
);
170+
return RMW_RET_NODE_NAME_NON_EXISTENT;
167171
}
168172

169173
rmw_ret_t

0 commit comments

Comments
 (0)