Skip to content

DBus.getConnection() throws RuntimeException #128

@infeo

Description

@infeo

This is a question.

To establish a connection to the DBus, one has to call DBus.getConnection(DBusBusType _bustype) throws DBusException (or one its sibling methods.

Within this method, at two spots a RuntimeExeption is thrown instead of the expected DBusException:

if (Util.isEmpty(sessionAddress)) {
throw new RuntimeException("Cannot Resolve Session Bus Address");
}

and
} catch (DBusException _ex) {
throw new RuntimeException("Cannot Resolve Session Bus Address", _ex);
}

My question is now: Why?
There is already an expected/ checked exception which could be used, namely the DBusException. This leads to errors in downstream libraries not anticipating the undocumented exceptions.

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