2015-12-18 01:51:55 -06:00
|
|
|
// error-pattern:greetings from the panic handler
|
|
|
|
|
|
|
|
use std::panic;
|
|
|
|
|
|
|
|
fn main() {
|
2016-05-24 16:24:44 -05:00
|
|
|
panic::set_hook(Box::new(|i| {
|
2018-11-02 13:11:31 -05:00
|
|
|
eprintln!("greetings from the panic handler");
|
2016-05-24 16:24:44 -05:00
|
|
|
}));
|
2015-12-18 01:51:55 -06:00
|
|
|
panic!("foobar");
|
|
|
|
}
|