diff --git a/rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp b/rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp index 16d5e95..c55a0b0 100644 --- a/rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp +++ b/rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp @@ -425,14 +425,9 @@ public: auto callback = it->second; try { cb_success = callback(State(previous_state)); - } catch (const std::exception &) { - // TODO(karsten1987): Windows CI doesn't let me print the msg here - // the todo is to forward the exception to the on_error callback - // RCUTILS_LOG_ERROR("Caught exception in callback for transition %d\n", - // it->first); - // RCUTILS_LOG_ERROR("Original error msg: %s\n", e.what()); - // maybe directly go for error handling here - // and pass exception along with it + } catch (const std::exception & e) { + RCUTILS_LOG_ERROR("Caught exception in callback for transition %d", it->first); + RCUTILS_LOG_ERROR("Original error: %s", e.what()); cb_success = node_interfaces::LifecycleNodeInterface::CallbackReturn::ERROR; } }