tongo / ble-java

A Java BLE (bluetooth 4.0) library for bluez.
MIT License
42 stars 19 forks source link

Provide more details about DBus Path when recieve Objert already exported #12

Open magillus opened 5 years ago

magillus commented 5 years ago

To better handle DBus exportObject exception we should provide Path to the exported object on the error.

example stacktrace doesn't define what is already exported.

org.freedesktop.dbus.exceptions.DBusException: Object already exported
    at org.freedesktop.dbus.AbstractConnection.exportObject(AbstractConnection.java:402)
    at it.tangodev.ble.BleCharacteristic.export(BleCharacteristic.java:102)
    at it.tangodev.ble.BleService.export(BleService.java:58)
    at it.tangodev.ble.BleApplication.export(BleApplication.java:230)
    at it.tangodev.ble.BleApplication.start(BleApplication.java:94)

I will add PR for this, since I need this at my usage.