pub enum GrabError {
TargetPathNotFound(PathBuf),
IoError {
path: PathBuf,
source: Error,
},
GitCommandError {
command: String,
stderr: String,
stdout: String,
},
GitExecutionError {
command: String,
source: Error,
},
GlobMatcherBuildError(Error),
PathStripError {
prefix: PathBuf,
path: PathBuf,
},
}Expand description
Errors that can occur during the dirgrab library operations.
These errors cover issues ranging from file system access problems to Git command failures and configuration errors.
Variants§
TargetPathNotFound(PathBuf)
The initial target_path provided in the GrabConfig was not found
on the filesystem or was inaccessible due to permissions.
IoError
An I/O error occurred while accessing a path during the operation (e.g., reading a file, canonicalizing a path).
GitCommandError
A git command (like git ls-files or git rev-parse) failed to execute
successfully, indicated by a non-zero exit status.
Contains the command string, stderr, and stdout output for debugging.
GitExecutionError
An error occurred while trying to spawn or run the git process itself.
This commonly happens if git is not installed or not found in the system’s PATH,
but can also indicate permission errors preventing execution.
GlobMatcherBuildError(Error)
Failed to build the glob pattern matcher from the patterns provided
in GrabConfig::exclude_patterns. This might happen if a pattern has
invalid syntax according to the ignore crate.
PathStripError
Error specifically for path stripping issues during tree generation.