Commit 8eee1a4
authored
Fix panic hook to handle audio backend errors and improve error messaging (#184)
This pull request makes targeted improvements to error handling and code
clarity in the audio backend and streaming player logic. The most
notable changes are:
**Audio Backend Panic Handling:**
* The panic hook now recognizes panics originating from both
`audio_backend/portaudio.rs` and `audio_backend/rodio.rs`, improving
detection and messaging for recoverable audio backend errors.
**Streaming Player Logic:**
* Refactored the check for the current streaming player in
`disconnect_streaming_player` to use the `?` operator for conciseness
and readability.1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
740 | | - | |
| 740 | + | |
741 | 741 | | |
742 | | - | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
743 | 746 | | |
744 | 747 | | |
745 | | - | |
| 748 | + | |
746 | 749 | | |
747 | 750 | | |
748 | 751 | | |
| |||
2084 | 2087 | | |
2085 | 2088 | | |
2086 | 2089 | | |
2087 | | - | |
2088 | | - | |
2089 | | - | |
| 2090 | + | |
2090 | 2091 | | |
2091 | 2092 | | |
2092 | 2093 | | |
| |||
0 commit comments