panik 0.2.0

Application-wide panic handling, whereby panics occurring in any thread are treated as a hard error and can be detected by other threads to trigger a graceful exit
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
mod setup;

#[test]
fn non_debug_swallowed() {
    struct MyOpaque(i32);

    let result = setup::panik_builder().run_and_handle_panics_no_debug(|| {
        let _ = std::thread::spawn(|| panic!("oh no")).join();
        MyOpaque(100)
    });

    assert!(result.is_none());
    assert!(panik::has_panicked());
}