1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use fehler::*; #[derive(Debug)] struct Error; #[throws(_)] fn do_it() -> i32 { if true { throw!(Error); } 0 } #[throws(_)] fn main() { do_it()?; }