macro_rules! throw_err { ($error:ident $(,)?) => { ... }; ($error:expr $(,)?) => { ... }; }
Throws an error.
let fail = false; if fail { throw_err!(MyError); } Ok(())