From 6101cc6ef5d1c77b9e8ec64954de05ae40286988 Mon Sep 17 00:00:00 2001 From: Artemy Date: Sat, 6 Aug 2022 19:24:36 +0300 Subject: [PATCH] feat: Add error text for file reading error --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index a9452bf..39f459f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,10 @@ fn main() { if args.verbose == true { println!("Running: {}\n", args.file); } - let file_input = fs::read_to_string(args.file).unwrap().parse().unwrap(); + let file_input = fs::read_to_string(args.file) + .expect("File reading error") + .parse() + .unwrap(); let mut onint = Interpreter::new(file_input);