Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed error messages not printing to terminal #777

Merged
merged 5 commits into from Jul 11, 2019
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp
Expand Up @@ -425,12 +425,11 @@ class LifecycleNode::LifecycleNodeInterfaceImpl
auto callback = it->second;
try {
cb_success = callback(State(previous_state));
} catch (const std::exception &) {
} catch (const std::exception & e) {
// 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());
RCUTILS_LOG_ERROR("Caught exception in callback for transition %d\n", it->first);
jacobperron marked this conversation as resolved.
Show resolved Hide resolved
RCUTILS_LOG_ERROR("Original error msg: %s\n", e.what());
// maybe directly go for error handling here
// and pass exception along with it
cb_success = node_interfaces::LifecycleNodeInterface::CallbackReturn::ERROR;
Expand Down