tramhao / termusic

Music Player TUI written in Rust
GNU General Public License v3.0
1.05k stars 44 forks source link

Change tui `mount_error_popup` to accept raw Errors instead of strings #258

Closed hasezoey closed 6 months ago

hasezoey commented 6 months ago

This PR changes the Error-Popup to accept raw Errors, this way we can fully log the error cause and chain to the log and also to the tui. in some more details:

some downsides: the ErrorPopup is limited to 4 lines of height, meaning better printing like the following is not possible until it changes:

Some Error

Caused by:
    0: Some Context
    1: Some original Error

and instead printed is

Some Error: Some Context: Some original Error

(which in longer chains may get cutoff)