1fn main() {
10 let err = build_error();
11
12 println!("{err}");
15}
16
17fn build_error() -> human_errors::Error {
19 human_errors::wrap_user(
20 human_errors::wrap_system(
21 std::io::Error::new(
22 std::io::ErrorKind::PermissionDenied,
23 "os error 13: permission denied",
24 ),
25 "Failed to read the configuration file at /etc/demo/config.yml.",
26 &["Ensure the application has permission to read the file."],
27 ),
28 "We could not load your configuration.",
29 &["Check that the --config option points to a readable file."],
30 )
31}