Skip to content

Commit

Permalink
Add back panic hook
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed Apr 30, 2024
1 parent 6a38dd4 commit 6d0c4b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ fn main() {
let game_name = std::str::from_utf8(&name_data[0..index]).expect("Failed to get game name!");
println!("Starting \"{}\" in {:?} Mode...", game_name, config.mode);

let panic = std::panic::take_hook();
std::panic::set_hook(Box::new(move |info| {
panic(info);
process::exit(1);
}));

let event_loop = EventLoop::new().unwrap();
event_loop.set_control_flow(ControlFlow::Poll);

Expand Down

0 comments on commit 6d0c4b9

Please sign in to comment.