Expand description
This crate provides wrappers for std::panic::catch_unwind
that handle the
edge case of the caught panic payload itself panicing when dropped.
Structs§
- Payload
- Unwinding payload wrapped to abort by default if it panics on drop
Functions§
- catch_
unwind_ or_ abort - Invoke the provided closure and catch any unwinding panics that may occur. If the panic payload panics when dropped, abort the process.
- catch_
unwind_ or_ forget - Invoke the provided closure and catch any unwinding panics that may occur. If the panic
payload panics when dropped,
mem::forget
the new panic payload and returnNone
. - catch_
unwind_ wrapped - Invoke the provided closure and catch any unwinding panics that may occur. This wraps
the unwinding payload in
Payload
, which will abort if it panics on drop by default. You can use the methods ofPayload
to change this behaviour. - drop_
or_ abort - Drop a value. If dropping the value results in an unwinding panic, abort the process.
- drop_
or_ else - Drop a value. If dropping the value results in an unwinding panic, call the provided closure with the panic payload.
- drop_
or_ forget - Drop a value. If dropping the value results in an unwinding panic,
mem::forget
the panic payload.