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
mod setup;

#[test]
fn no_panic() {
    let result = setup::panik_builder().run_and_handle_panics(|| "nice");

    assert_eq!(result.to_owned(), Some("nice"));
    assert!(!panik::has_panicked());

    let panics = panik::panics();
    assert!(panics.is_empty());
}