ros / dynamic_reconfigure

BSD 3-Clause "New" or "Revised" License
48 stars 111 forks source link

Reraising DynamicReconfigureCallbackException in case of a failing service call #87

Closed arne48 closed 7 years ago

arne48 commented 7 years ago

When trying to call the configuration server rospy raises exceptions in the case of failures. Till now these were non-transparent handed over to the calling function of update_configuration. This makes it easy that those function don't consider to catch these exception and crash. An example for this is the dynamic_reconfigure rqt widget. https://github.com/ros-visualization/rqt_reconfigure/pull/10

In the fix I propose not only to catch the ServiceException but also the DynamicReconfigureCallbackException. Doing so it would be easy to see which exceptions can be raised by the function when seeing the code of dynamic_reconfigure. A small further point might be that like this it is not necessary to import exceptions from different packages which reduces the dependencies for the calling program.

mikaelarguedas commented 7 years ago

This looks sensible, thanks for the contribution and opening the corresponding PR on rqt_reconfigure. This may require an announcement to the users before the release so that they update their catching logic accordingly to prevent unwanted breakage