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

Ensure typesupport handle functions do not throw. #99

Merged
merged 2 commits into from
Dec 14, 2020
Merged

Conversation

hidmic
Copy link
Contributor

@hidmic hidmic commented Dec 14, 2020

While working on #98, I stumbled upon this inconsistency in error handling within typesupport handle functions.

These functions are eventually called by rmw implementations with no consideration for potential exceptions. If we add that no API documentation mentions exceptions and that some of these APIs even have C linkage, I'm inclined to assume these functions shouldn't ever throw to begin with.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@hidmic
Copy link
Contributor Author

hidmic commented Dec 14, 2020

CI up to rosidl_typesupport_c, rosidl_typesupport_cpp, and test_communication:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@brawner
Copy link
Contributor

brawner commented Dec 14, 2020

For rosidl_typesupport_cpp, what do you think about adding noexcept to make it clear calling code won't need to catch exceptions?

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@hidmic
Copy link
Contributor Author

hidmic commented Dec 14, 2020

what do you think about adding noexcept

Good idea! See c27aeb7.

@hidmic
Copy link
Contributor Author

hidmic commented Dec 14, 2020

Alright! CI is happy, reviewer is happy, I'm happy. Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants