die on panic

This commit is contained in:
Erica Z 2024-11-06 22:12:03 +01:00
parent 6b8b361ba8
commit 1f482ab512

View file

@ -30,6 +30,13 @@ fn init_tracing() {
fn init_tracing() {} fn init_tracing() {}
fn main() -> glib::ExitCode { fn main() -> glib::ExitCode {
// abort on any panic
let orig_hook = std::panic::take_hook();
std::panic::set_hook(Box::new(move |panic_info| {
orig_hook(panic_info);
std::process::exit(1);
}));
gio::resources_register_include!("audrey.gresource").expect("could not register resources"); gio::resources_register_include!("audrey.gresource").expect("could not register resources");
init_tracing(); init_tracing();