[][src]Macro witcher::err

macro_rules! err {
    ($msg:expr) => { ... };
    ($fmt:expr, $($arg:tt)*) => { ... };
}

err! works just like bail! but doesn't return

just a simple way to get string formatting like format! for new errors. The same could be done with Error::raw(format!("{}", msg)) but is more verbose.

Examples

err!("oh no!");
err!("foo: {}", "oh no!");