New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw appropriate exception when performing I/O on unknown characteristic #38
Milestone
Comments
This comment has been minimized.
This comment has been minimized.
twyatt
added a commit
that referenced
this issue
Jan 15, 2021
When a service, characteristic or descriptor cannot be found, `NoSuchElementException ` is now thrown with a `message` stating the UUID that could not be found. On Apple platform, services are now cached on service discovery (which matches behavior of the other platform targets). Closes #14 Closes #38
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, when attempting to write/read a characteristic that was not discovered then it will throw a
NoSuchElementException
(as thrown byfirst
):kable/core/src/jsMain/kotlin/Peripheral.kt
Lines 207 to 212 in c750de5
Instead, we should throw an exception that clearly indicates what service or characteristic wasn't found.
The text was updated successfully, but these errors were encountered: