use crate::ArchiveError;
pub fn display_error(error: &ArchiveError) {
eprintln!("Error: {}", error);
match error {
#[cfg(feature = "encode")]
ArchiveError::DuplicateFiles { paths } => {
eprintln!("\nDuplicate file paths detected:");
for path in paths {
eprintln!(" - {}", path);
}
eprintln!("\nPlease ensure all file paths are unique.");
}
ArchiveError::UnsupportedFormat(fmt) => {
eprintln!("\nThe format '{}' is not supported or not enabled.", fmt);
eprintln!("Check that the corresponding feature flag is enabled.");
}
_ => {}
}
}