SpaceTeam / STS1_EDU_Scheduler

MIT License
1 stars 0 forks source link

Add a custom panic hook #86

Open florg-32 opened 1 year ago

florg-32 commented 1 year ago

A Rust program may panic (i.e. cleanly abort execution) in case of fatal errors (e.g. any calls to unwrap() on a Result that contains an Error). This is only logged to stderr, which we cant read from the EDU.

Use std::panic::set_hook(...) to add a function that logs panic information with our usual log::error!()

florg-32 commented 1 month ago

https://docs.rs/log-panics/latest/log_panics/