diff --git a/rclcpp/include/rclcpp/exceptions/exceptions.hpp b/rclcpp/include/rclcpp/exceptions/exceptions.hpp index 96df6788cd..549b25db05 100644 --- a/rclcpp/include/rclcpp/exceptions/exceptions.hpp +++ b/rclcpp/include/rclcpp/exceptions/exceptions.hpp @@ -109,6 +109,8 @@ class UnimplementedError : public std::runtime_error : std::runtime_error(msg) {} }; +typedef void (*reset_error_function_t)(); + /// Throw a C++ std::exception which was created based on an rcl error. /** * Passing nullptr for reset_error is safe and will avoid calling any function @@ -129,7 +131,7 @@ throw_from_rcl_error [[noreturn]] ( rcl_ret_t ret, const std::string & prefix = "", const rcl_error_state_t * error_state = nullptr, - void (* reset_error)() = rcl_reset_error); + reset_error_function_t reset_error = rcl_reset_error); /* *INDENT-ON* */ class RCLErrorBase