kable
kable copied to clipboard
GattRequestRejectedException in common code
Hello everyone. The GattRequestRejectedException is declared in Android module. Thus it is not possible catch it in common code. Is it possible declared it in common module of kable library?
Thank you.
The current exception hierarchy is as follows:
-
Exception-
BluetoothException-
BluetoothDisabledException -
GattRequestRejectedException(Android-only)
-
-
IOException-
NotConnectedException-
NotReadyException -
ConnectionLostException
-
-
ConnectionRejectedException -
GattStatusException
-
-
Would it suffice for you to catch BluetoothException?
In general, the exception organization in Kable could use some re-structuring (e.g. #177), so I'm open to changing things up a bit, but I'm reluctant to move GattRequestRejectedException to common code as it is a state specific to Android.
Is there a reason BluetoothException won't suffice in common code?