diff --git a/test_rclcpp/test/test_waitable.cpp b/test_rclcpp/test/test_waitable.cpp index 6c3b043d..ba0f43a5 100644 --- a/test_rclcpp/test/test_waitable.cpp +++ b/test_rclcpp/test/test_waitable.cpp @@ -61,11 +61,13 @@ class WaitableWithTimer : public rclcpp::Waitable return 1u; } - bool + void add_to_wait_set(rcl_wait_set_t * wait_set) override { rcl_ret_t ret = rcl_wait_set_add_timer(wait_set, timer_.get(), &timer_idx_); - return RCL_RET_OK == ret; + if (RCL_RET_OK != ret) { + throw std::runtime_error("failed to add timer to wait set"); + } } bool