-
-
Notifications
You must be signed in to change notification settings - Fork 77
Description
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
:
dbus-java/dbus-java/src/main/java/org/freedesktop/dbus/connections/impl/DBusConnection.java
Lines 259 to 261 in 7f6d908
if (Util.isEmpty(sessionAddress)) { | |
throw new RuntimeException("Cannot Resolve Session Bus Address"); | |
} |
and
dbus-java/dbus-java/src/main/java/org/freedesktop/dbus/connections/impl/DBusConnection.java
Lines 269 to 271 in 7f6d908
} 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.