[go: up one dir, main page]

human-errors 0.2.1

An error library focused on providing your users with relevant advice for any problem.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::{Error, wrap_user};
use std::string::FromUtf8Error;

impl From<FromUtf8Error> for Error {
    fn from(err: FromUtf8Error) -> Self {
        wrap_user(
            err,
            "We could not parse the UTF-8 content you provided.",
            &["Make sure that you are providing us with content which is valid UTF-8."],
        )
    }
}