Skip to content

Commit

Permalink
issue/135: better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
morganthomas committed Apr 8, 2024
1 parent 6874437 commit ad8faea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions basic/src/bin/valida.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ fn main() {
let args = Args::parse();

let mut machine = BasicMachine::<BabyBear>::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();
Expand Down

0 comments on commit ad8faea

Please sign in to comment.