Files
rust/tests/ui/panics/panic-set-handler.rs

13 lines
252 B
Rust
Raw Normal View History

//@ run-fail
//@ error-pattern:greetings from the panic handler
//@ ignore-emscripten no processes
2015-12-17 23:51:55 -08:00
use std::panic;
fn main() {
panic::set_hook(Box::new(|i| {
eprintln!("greetings from the panic handler");
}));
2015-12-17 23:51:55 -08:00
panic!("foobar");
}