pub fn wrap_err<T>(msg: &str, src: T) -> TinkError
Expand description
Wrap an error with an additional message. This utility is intended to help with porting Go code to Rust, to cover patterns like:
thing, err := FunctionCall()
if err != nil {
return nil, fmt.Errorf("FunctionCall failed: %s", err)
}