Bluetooth off throws an unhandleable error on Mac #1219
Labels
Backend: Core Bluetooth
Issues and PRs relating to the Core Bluetooth backend
bug
Something isn't working
Description
Running the scanner when device Bluetooth is turned off throws an exception that is not possible to catch (unraisable?).
I was expecting the error to be catchable so I can show a more friendly error to the user that they need to turn their Bluetooth on.
What I Did
Running this code with Bluetooth turned off.
Expected output:
Actual output:
Logs
Extra
Ignoring unraisable errors makes the situation a bit better, but not perfect, and also this feels like a very dirty solution:
Output:
The text was updated successfully, but these errors were encountered: