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

Closed
twyatt opened this issue Dec 21, 2023 · 2 comments
Closed

Improve documentation for Peripheral.connect #614

twyatt opened this issue Dec 21, 2023 · 2 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)

@twyatt
Copy link
Member Author

twyatt commented Jul 30, 2024

Related to #724.

@twyatt
Copy link
Member Author

twyatt commented Nov 26, 2024

The exception hierarchy changed significantly w/ #724 underway. This issue is no longer applicable.

@twyatt twyatt closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
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