Skip to content
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

Improve documentation for Peripheral.connect #614

Open
twyatt opened this issue Dec 21, 2023 · 0 comments
Open

Improve documentation for Peripheral.connect #614

twyatt opened this issue Dec 21, 2023 · 0 comments

Comments

@twyatt
Copy link
Member

twyatt commented Dec 21, 2023

Would it make sense to document BluetoothDisabledException as another possible exception on Peripheral.connect? Currently only ConnectionRejectedException and CancellationException are documented.

To make my intrusion worse: I went through the code and got the following questions, which I can turn into their own issues if thats a better place for them. They both are about documentation.

  1. It looks liks Scanner.advertisements can throw BluetoothDisabledException and ScanFailedException, which I believe would crash my app if the CoroutineContext with which I collect advertisements does not use a SupervisorJob and if I don't use Flow.catch. Would it make sense to document these exceptions on that property?
  2. (Nearly same as my initial question) If I am not mistaken then Peripheral.connect can throw ConnectionRejectedException, BluetoothDisabledException and ConnectionLostException. Should these be documented?

I can create a PR with such documentation if desired.

Originally posted by @degill in #366 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant