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

Update the executor to not throw ExternalShutdownException #1279

Open
clalancette opened this issue May 7, 2024 · 0 comments
Open

Update the executor to not throw ExternalShutdownException #1279

clalancette opened this issue May 7, 2024 · 0 comments
Labels

Comments

@clalancette
Copy link
Contributor

This is an issue split out of ros2/examples#379

Currently the rclpy executor can throw an ExternalShutdownException:

raise ExternalShutdownException()

However, there is really no need to throw an exception at this point that callers of rclpy.spin would need to handle; we could instead just return a value indicating why the spin stopped. This would make it so users need less error-handling code, make this act more like rclcpp (which doesn't throw an exception here), and still provide information in case somebody wants to know why the spin stopped.

Further, we can easily stop throwing an exception here with no impact to downstream consumers. If they aren't handling the exception today, this will just make it a bit more robust. If they are handling ExternalShutdownException today, then that effectively becomes dead code but nothing really breaks.

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

No branches or pull requests

2 participants