Fixe error messages not printing to terminal (#777)
* Uncommented catch exception code to print error Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com> * put back the e Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com> * uncommented error printing in exception handling Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com> * Removed "/n" characters. Update lifecycle_node_interface_impl.hpp Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com> * Fix CI issue and remove TODO Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This commit is contained in:
parent
378657865e
commit
207bcc5de3
1 changed files with 3 additions and 8 deletions
|
@ -425,14 +425,9 @@ public:
|
||||||
auto callback = it->second;
|
auto callback = it->second;
|
||||||
try {
|
try {
|
||||||
cb_success = callback(State(previous_state));
|
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
|
RCUTILS_LOG_ERROR("Caught exception in callback for transition %d", it->first);
|
||||||
// the todo is to forward the exception to the on_error callback
|
RCUTILS_LOG_ERROR("Original error: %s", e.what());
|
||||||
// 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
|
|
||||||
cb_success = node_interfaces::LifecycleNodeInterface::CallbackReturn::ERROR;
|
cb_success = node_interfaces::LifecycleNodeInterface::CallbackReturn::ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue