Skip to content

Library-specific exception #6

@ZdenekM

Description

@ZdenekM

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions