Closed antoinealb closed 6 years ago
Pyuavcan does that to ensure that exceptions that occur in a handler do not prevent the library from invoking other handlers. Adding a flag as you suggested seems sensible. Perhaps it's time for a pull request?
PR opened: #46
Closed in #46
Sometimes I hit a bug or an exception in a callback. However this never hits my debugger because UAVCAN catches them and ignores them.
Example: https://github.com/UAVCAN/pyuavcan/blob/master/uavcan/node.py#L217-L220
I would suggest passing a flag to the node or the spin method, something like
node.spin(catch_callback_exceptions=False)
to let advanced users use exceptions like they want.What do you think? Maybe I am missing something on this design choice?