From ad8faea72d0078338b1a7a499186f9439cce73e8 Mon Sep 17 00:00:00 2001 From: Morgan Thomas Date: Mon, 8 Apr 2024 11:41:18 -0400 Subject: [PATCH] issue/135: better error message --- basic/src/bin/valida.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/basic/src/bin/valida.rs b/basic/src/bin/valida.rs index 98b3a9f..590f933 100644 --- a/basic/src/bin/valida.rs +++ b/basic/src/bin/valida.rs @@ -53,8 +53,10 @@ fn main() { let args = Args::parse(); let mut machine = BasicMachine::::default(); - let Program { code, data } = - load_executable_file(fs::read(&args.program).expect("Failed to read executable file")); + let Program { code, data } = load_executable_file( + fs::read(&args.program) + .expect(format!("Failed to read executable file: {}", &args.program).as_str()), + ); machine.program_mut().set_program_rom(&code); machine.cpu_mut().fp = args.stack_height; machine.cpu_mut().save_register_state();