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

Fix unhandled xmlrpc exception #218

Merged
merged 1 commit into from
Apr 20, 2023
Merged

Conversation

achim-k
Copy link
Collaborator

@achim-k achim-k commented Apr 20, 2023

Public-Facing Changes

  • Fix unhandled xmlrpc exception causing nodelet to crash (ROS1)

Description

Addresses the crash reported in #217

@achim-k achim-k requested a review from jtbandes April 20, 2023 19:00
} catch (const XmlRpc::XmlRpcException& ex) {
ROS_ERROR("Failed to update parameter: %s", ex.getMessage().c_str());
} catch (...) {
ROS_ERROR("Failed to update parameter");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to include more info about the exception type in the log? I googled a little bit and couldn't find anything... I see that you can use current_exception() to get an exception_ptr, but then there's nothing useful you can do with that 😬

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also not aware that this would be possible. Also just learned that you can literally throw anything, e.g. just throw 1;

@achim-k achim-k merged commit a45b1b3 into main Apr 20, 2023
@achim-k achim-k deleted the achim/fix_unhandled_xmlrpc_exception branch April 20, 2023 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants