From 4872af624fa0061d034a1ce54d4c66f478635216 Mon Sep 17 00:00:00 2001 From: Adam Aposhian Date: Mon, 5 Feb 2024 17:28:37 -0700 Subject: [PATCH] log and return error code instead of throwing Co-authored-by: Tomoya Fujita Signed-off-by: Adam Aposhian --- rclcpp_components/src/node_main.cpp.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rclcpp_components/src/node_main.cpp.in b/rclcpp_components/src/node_main.cpp.in index 7852986ad3..bd1f00bf75 100644 --- a/rclcpp_components/src/node_main.cpp.in +++ b/rclcpp_components/src/node_main.cpp.in @@ -63,7 +63,8 @@ int main(int argc, char * argv[]) } if (exec.get_all_callback_groups().empty()) { - throw std::runtime_error("No matching class found"); + RCLCPP_ERROR(logger, "No matching class found"); + return 1; } exec.spin();