Expand description
Functions for printing status and error messages to stderr.
Report status
Similar to Cargo output, a status
title is justified, colored and made bold. Coloring is provided by the
Color
enum.
Report errors
Use err
or anyhow_err
to print error information from either a
narrate::Error
or an anyhow::Error
respectively. Include
error chains/causes in your output by using err_full
or
anyhow_err_full
.
Features
If you have no desire to use any of narrate’s other features, you can use just this module’s functionality by disabling the default features and just using “report”.
[dependencies]
narrate = { version = "0.4.0", default-features = false, features = ["report"] }
This will still allow you to report anyhow errors, but not narrate errors.
Functions
- Report an
anyhow::Error
to stderr - Report an
anyhow::Error
to stderr, printing a list of causes - Report an
Error
to stderr. - Report an
Error
to stderr, printing a list of causes - Report a status to stderr.