fanucpy
fanucpy copied to clipboard
Library-specific exception
Right now, the handle_response
raises Exception
:
https://github.com/torayeff/fanucpy/blob/27a70d1c19f610f37cc196c7e97b1d682f37167e/src/fanucpy/Robot.py#L61
which is probably not a good practice. I propose to define at least one library-specific exception and optionally other derived exceptions... Something like this:
class FanucPyException(Exception):
pass
class CommException(FanucPyException)
pass
Which will allow me (in the application code) to catch just the specific exception raised by the library, instead of the generic one.
Thanks for your consideration.