void
GraphListener::run()
{
int count{1};
try {
run_loop();
} catch (const std::exception & exc) {
++count;
fprintf(stderr, "[rclcpp]: %s:%d, caught %s exception in GraphListener thread: %s\n",
__FILE__, __LINE__,
rmw::impl::cpp::demangle(exc).c_str(),
exc.what());
if (count == 2) {
try {
run_loop();
}
catch(const std::exception & exc) {
fprintf(stderr, "[rclcpp]: %s:%d, caught %s exception in GraphListener thread: %s\n",
__FILE__, __LINE__,
rmw::impl::cpp::demangle(exc).c_str(),
exc.what());
}
} else {
return;
}
//std::rethrow_exception(std::current_exception());
} catch (...) {
fprintf(stderr, "[rclcpp]: %s:%d, unknown error in GraphListener thread\n",
__FILE__, __LINE__);
//std::rethrow_exception(std::current_exception());
}
}
graph_listener
于 2024-09-05 18:57:11 首次发布