Skip to content
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

exception types could use a common base class #149

Open
foresto opened this issue Jan 30, 2023 · 0 comments
Open

exception types could use a common base class #149

foresto opened this issue Jan 30, 2023 · 0 comments

Comments

@foresto
Copy link

foresto commented Jan 30, 2023

The exception classes derive directly from various python exceptions, rather than sharing a single dbus-next-specific superclass.

Because of this, distinguishing dbus errors from other errors requires application code to wrap dbus-next calls in their own try/except blocks, and wrap other calls in separate try/except blocks (or else catch every dbus-next exception individually by name). The result is very cluttered code.

A coherent exception hierarchy would make dbus-next much nicer to work with, and allow application code to be simpler and easier to read.

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

No branches or pull requests

1 participant