diff --git a/rclcpp/include/rclcpp/parameter_client.hpp b/rclcpp/include/rclcpp/parameter_client.hpp index 77ae4d2..2cf09d8 100644 --- a/rclcpp/include/rclcpp/parameter_client.hpp +++ b/rclcpp/include/rclcpp/parameter_client.hpp @@ -271,7 +271,11 @@ public: { return get_parameter_impl( parameter_name, - std::function([]() -> T {throw std::runtime_error("Parameter not set");})); + std::function([¶meter_name]() -> T + { + throw std::runtime_error("Parameter '" + parameter_name + "' is not set"); + }) + ); } RCLCPP_PUBLIC