Module errors

Module errors 

Source
Expand description

Helpers for error handling.

Traits§

LoggableError
A trait that allows printing the entire error chain of an Error (it is implemented for anyhow::Error) along with a custom context message.
PrettyUnwrap
A trait to provide a nicer way to unwarp anyhow::Result.

Functions§

display_error
Displays an anyhow::Error’s main error and its error chain to stderr.
into_io_error
Generates an io::Error from the given anyhow::Error.
io_error
Generates an io::Error from the given string.
log_error
Logs anyhow::Error’s its error chain using the ERROR log level.
log_warning
Logs anyhow::Error’s its error chain using the WARN log level.