You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
This is an issue split out of ros2/examples#379
Currently the rclpy executor can throw an
ExternalShutdownException
:rclpy/rclpy/rclpy/executors.py
Line 689 in 99f1ce9
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.The text was updated successfully, but these errors were encountered: