controller_err

Macro controller_err 

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

Create a ControllerError 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));