Skip to content

Commit

Permalink
feat: improve error reporting resolution suggestions (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Jan 22, 2024
1 parent 9f47846 commit afff5ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/habluetooth/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ async def _async_start(self) -> None:
continue
raise ScannerStartError(
f"{self.name}: Timed out starting Bluetooth after"
f" {START_TIMEOUT} seconds"
f" {START_TIMEOUT} seconds; "
"Try power cycling the Bluetooth hardware."
) from ex
except BleakError as ex:
error_str = str(ex)
Expand Down Expand Up @@ -329,7 +330,8 @@ async def _async_start(self) -> None:
exc_info=True,
)
raise ScannerStartError(
f"{self.name}: Failed to start Bluetooth: {ex}"
f"{self.name}: Failed to start Bluetooth: {ex}; "
"Try power cycling the Bluetooth hardware."
) from ex

# Everything is fine, break out of the loop
Expand Down

0 comments on commit afff5ba

Please sign in to comment.