Function bitflags::__core::panic::propagate [] [src]

pub fn propagate(payload: Box<Any + 'static + Send>) -> !
Unstable (panic_propagate)

: awaiting feedback

Triggers a panic without invoking the panic handler.

This is designed to be used in conjunction with recover to, for example, carry a panic across a layer of C code.

Examples

#![feature(std_panic, recover, panic_propagate)]

use std::panic;

let result = panic::recover(|| {
    panic!("oh no!");
});

if let Err(err) = result {
    panic::propagate(err);
}