Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

Library-specific exception #6

Open
ZdenekM opened this issue May 16, 2022 · 0 comments
Open

Library-specific exception #6

ZdenekM opened this issue May 16, 2022 · 0 comments

Comments

@ZdenekM
Copy link

ZdenekM commented May 16, 2022

Right now, the handle_response raises Exception:

raise Exception(msg)

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant