nounwind 0.1.3

A attribute macro to prevent panics from unwinding, similar to C++ noexcept
Documentation
1
2
3
4
5
6
7
pub fn main() {
    let x = 7;
    nounwind::assert_nounwind!(x > 5, "should not trigger abort (x={x})");
    nounwind::assert_nounwind!(x > 6); // this should not trigger an abort
    nounwind::assert_nounwind!(x > 7, "this will trigger an abort");
    nounwind::unreachable_nounwind();
}