Small refactor in exception handling in core.rs

This commit is contained in:
2025-12-24 16:14:54 +01:00
parent 44394b3d19
commit 6d9efb7eb8

View File

@@ -50,19 +50,17 @@ impl Core {
} }
if instr & 3 != 3 { if instr & 3 != 3 {
// Compressed instruction - (currently) unsupported
self.throw_exception(ExceptionType::IllegalInstruction); self.throw_exception(ExceptionType::IllegalInstruction);
break; break;
} }
let instr = Instruction(instr); let instr = Instruction(instr);
match find_and_exec(instr, self) { if let Err(e) = find_and_exec(instr, self) {
Ok(()) => {} self.throw_exception(e);
Err(e) => { eprintln!("instr: {:08x}", instr.0);
self.throw_exception(e); break;
eprintln!("instr: {:08x}", instr.0);
break;
}
} }
} }
} }