blob: 4f6460200377ee17086a41c32b3f87cada0318e0 [file] [log] [blame]
//@ run-fail
//@ regex-error-pattern: thread 'main' \(\d+\) panicked
//@ error-pattern: foobar
//@ needs-subprocess
use std::panic;
fn main() {
panic::set_hook(Box::new(|i| {
eprint!("greetings from the panic handler");
}));
panic::take_hook();
panic!("foobar");
}