pub fn map_string_err<T: ToString>(loc: &'static str) -> impl Fn(T) -> Error
Maps the given string error to an error.