user

Function user 

Source
pub fn user<T>(error: T, advice: &'static [&'static str]) -> Error
where T: Into<Box<dyn Error + Send + Sync>>,
Expand description

An error triggered by something the user has done, with a deeper cause.

Constructs a new Error describing a failure which was the result of an action that the user has taken. This error includes a description of what occurred, as well as some advice for the user to try to mitigate the problem. It also includes the details of another error which resulted in this failure.

NOTE: The internal error may be any type which may be converted into a Box.

ยงExamples

use human_errors;

human_errors::user(
  "ENOENT 2: No such file or directory",
  &["Make sure that the file exists and is readable by the application."],
);