Macro etrace::new_err_from [−][src]
macro_rules! new_err_from { ($kind:expr, $description:expr) => { ... }; ($kind:expr) => { ... }; }
Creates a new error by converting kind
into the matching Error<T>
(using a From
-trait)
and returns it (return Err(Error<T>)
)
Use new_err_from!(kind)
to create an error with an automatically created description or use
new_err_from!(kind, description)
to provide an explicit description