Module error

Source
Expand description

Module for the error handling classes and enums.

Structs§

DotfilesError
Struct that represents an error that happened while parsing or executing actions.

Enums§

ErrorType
A collection of types of errors that may occur while parsing or executing actions

Functions§

add_directive_error_prefix
Adds a prefix to an error with the name of the directive where it happened
execution_error
Creates an ErrorType::ExecutionError
fold_until_first_err
Executes the process_function on each of the items in the iterable, and folds them using the fold_function. Returns the processed and folded items if all the processing and folding was successful, otherwise returns the first error found.
process_until_first_err
Executes the process_function on each of the items in the iterable, and then returns Ok(()). It stops execution if any of the process functions returns an Error, and returns said error.