From 48f88ee17e82abc556a72e00d65f0ef1169d2978 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 19 Jul 2024 10:16:22 +0200 Subject: [PATCH] feat(panic): add human_panic --- Cargo.toml | 1 + src/main.rs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index ef338fc..fd21eb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ sound = ["dep:rodio"] [dependencies] anyhow = "1.0.86" chrono = "0.4.38" +human-panic = "2.0.0" humantime = "2.1.0" libpt = { version = "0.6.0", features = ["cli"] } notify-rust = { version = "4.11.0", default-features = false, features = [ diff --git a/src/main.rs b/src/main.rs index 2294a51..0186fa2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,13 @@ use self::clock::Clock; mod clock; 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 let clock = Clock::parse(); if clock.verbose.level() >= Level::DEBUG {