util_err

Macro util_err 

Source
macro_rules! util_err {
    ($variant:ident, $msg:expr) => { ... };
    ($variant:ident, $msg:expr, $src:expr) => { ... };
}
Expand description

Create a UtilError with less boilerplate.

§Examples

// Without source
let err = macro_name!(Generic, "message".to_string());

// With source
let err = macro_name!(Generic, "message".to_string(), source_err);

// With format!
let err = macro_name!(Generic, format!("Failed: {}", detail));