feat(panic): add human_panic
cargo devel CI / cargo CI (push) Successful in 1m48s Details

This commit is contained in:
Christoph J. Scherr 2024-07-19 10:16:22 +02:00
parent 71f887c62e
commit 48f88ee17e
2 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,7 @@ sound = ["dep:rodio"]
[dependencies] [dependencies]
anyhow = "1.0.86" anyhow = "1.0.86"
chrono = "0.4.38" chrono = "0.4.38"
human-panic = "2.0.0"
humantime = "2.1.0" humantime = "2.1.0"
libpt = { version = "0.6.0", features = ["cli"] } libpt = { version = "0.6.0", features = ["cli"] }
notify-rust = { version = "4.11.0", default-features = false, features = [ notify-rust = { version = "4.11.0", default-features = false, features = [

View File

@ -15,6 +15,13 @@ use self::clock::Clock;
mod clock; mod clock;
fn main() -> anyhow::Result<()> { fn main() -> anyhow::Result<()> {
human_panic::setup_panic!(human_panic::Metadata::new(
env!("CARGO_BIN_NAME"),
env!("CARGO_PKG_VERSION")
)
.authors(env!("CARGO_PKG_AUTHORS"))
.homepage(env!("CARGO_PKG_HOMEPAGE")));
// setup the cli // setup the cli
let clock = Clock::parse(); let clock = Clock::parse();
if clock.verbose.level() >= Level::DEBUG { if clock.verbose.level() >= Level::DEBUG {