Function human_errors::system_with_internal[][src]

pub fn system_with_internal<T>(
    description: &str,
    advice: &str,
    internal: T
) -> Error where
    T: Into<Box<dyn Error + Send + Sync>>, 

An error triggered by the system rather than the user, with a deeper cause.

Constructs a new Error describing a failure which was the result of a failure in the system, rather than a user's action. 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 Boxstd::error::Error.

Examples

use human_errors;
 
human_errors::system_with_internal(
  "We could not open the config file you provided.",
  "Make sure that the file exists and is readable by the application.",
  human_errors::detailed_message("ENOENT 2: No such file or directory")
);