AMythicDev / minus

An asynchronous, runtime data feedable terminal paging library for Rust
https://crates.io/crates/minus/
Apache License 2.0
316 stars 23 forks source link

init_core: Handle runtime panics better #77

Closed AMythicDev closed 2 years ago

AMythicDev commented 2 years ago

In previous versions, during a panic the error message (and backtrace possibly) might not get displayed after a panic. This happened because they were printed on the alternate screen and after the program exited, the terminal automatically switches to the main screen. hence the message never gets to be displayed.

This patch fixes this by doing a cleanup before proceeding furthur on the unwinding of the panic