From 993132380fe02784c1f9be813a12fc8c4e2788da Mon Sep 17 00:00:00 2001 From: Eric W Date: Fri, 9 Jun 2023 23:48:40 +0200 Subject: [PATCH] improve error msg of `rcl_expand_topic_name` (#1076) If `RCL_RET_TOPIC_NAME_INVALID` is returned the error msg is obtained by calling `rcl_topic_name_validation_result_string` to ease debugging invalid topics. Signed-off-by: Eric Wolf --- rcl/src/rcl/expand_topic_name.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcl/src/rcl/expand_topic_name.c b/rcl/src/rcl/expand_topic_name.c index 313949c67..142e04c4f 100644 --- a/rcl/src/rcl/expand_topic_name.c +++ b/rcl/src/rcl/expand_topic_name.c @@ -70,7 +70,7 @@ rcl_expand_topic_name( return ret; } if (validation_result != RCL_TOPIC_NAME_VALID) { - RCL_SET_ERROR_MSG("topic name is invalid"); + RCL_SET_ERROR_MSG(rcl_topic_name_validation_result_string(validation_result)); return RCL_RET_TOPIC_NAME_INVALID; } // validate the node name