diff --git a/cat_xlsx/src/main.rs b/cat_xlsx/src/main.rs index 40f5aa1..aa8ea29 100644 --- a/cat_xlsx/src/main.rs +++ b/cat_xlsx/src/main.rs @@ -20,8 +20,14 @@ fn main() -> Result<(), Box> { let path = args.xlsx_file; // Check if the file exists if !path.exists() { + eprintln!("Error: File not found"); + std::process::exit(1); + } // Validate file extension - if !path.extension().map_or(false, |ext| ext.eq_ignore_ascii_case("xlsx")) { + if !path + .extension() + .map_or(false, |ext| ext.eq_ignore_ascii_case("xlsx")) + { eprintln!("Error: File must have .xlsx extension"); std::process::exit(1); }