[−][src]Macro chainerror::strerr
Convenience macro for cherr!(T(format!(…)))
where T(String)
Examples
derive_str_cherr!(Func2Error); fn func2() -> ChainResult<(), Func2Error> { let filename = "foo.txt"; Err(strerr!(Func2Error, "Error reading '{}'", filename)) } derive_str_cherr!(Func1Error); fn func1() -> Result<(), Box<Error>> { func2().map_err(mstrerr!(Func1Error, "func1 error"))?; Ok(()) }