-
Notifications
You must be signed in to change notification settings - Fork 26
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
CapabilityServer.__catch_and_log makes it hard to catch exceptions #69
Comments
|
I'm using From the error output I saw that there was a However, I also must say I'm confused, that I receive this exception at all. From a ROS service call I'm expecting either a True or False return or in special cases a |
You can take out the whole
Services should raise a |
Learning something new everyday! 😊 First, the re-raise in the
So, catching Now, I wonder though, if handling this exception should actually be done inside |
I think you may be right. I guess the question in my mind is what it should do instead. If a call to It seems dangerous to rely on a return code value in Python, most people will not check that by default. |
While improving the error handling in the rapp manager for issue #68, it took me a while to do the right exception handling. Only when I realised that
CapabilityServer.__catch_and_log()
redefines theRuntimeError
exception raised byCapabilityServer.__free_capability()
, I understood why myRuntimeError
catching didn't work.I'm under the assumption that doing a catch all via
except Exception
is bad practise. So, I'm wondering if__catch_and_log
should be changed.The text was updated successfully, but these errors were encountered: