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.
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
RuntimeExeptionis thrown instead of the expectedDBusException:dbus-java/dbus-java/src/main/java/org/freedesktop/dbus/connections/impl/DBusConnection.java
Lines 259 to 261 in 7f6d908
and
dbus-java/dbus-java/src/main/java/org/freedesktop/dbus/connections/impl/DBusConnection.java
Lines 269 to 271 in 7f6d908
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.