[][src]Macro witcher::wrap

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

wrap! behaves much like the venerable bail! but wraps an external error

It also provides a variation to allow for format!() type formatting.

Examples

wrap!(std::io::Error::new(std::io::ErrorKind::Other, "oh no!"), "wrapper msg");