Skip to content

Commit

Permalink
tweak error output format
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Gao <ethan.gao@linux.intel.com>
  • Loading branch information
gaoethan committed Dec 19, 2017
1 parent 518a676 commit b3bcfba
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rcl/src/rcl/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ rcl_node_init(
}
if (validation_result != RMW_NAMESPACE_VALID) {
const char * msg = rmw_namespace_validation_result_string(validation_result);
char fixed_msg[256];
rcutils_snprintf(fixed_msg, sizeof(fixed_msg), "%s, result '%d'", msg, validation_result);
RCL_SET_ERROR_MSG(fixed_msg, *allocator);
RCL_SET_ERROR_MSG_WITH_FORMAT_STRING(*allocator, "%s, result '%d'", msg, validation_result);

if (should_free_local_namespace_) {
allocator->deallocate((char *)local_namespace_, allocator->state);
Expand Down

0 comments on commit b3bcfba

Please sign in to comment.