a32_unicorn: Throw on error to trigger SCOPE_EXIT code

This commit is contained in:
Merry 2022-02-15 15:20:01 +00:00
parent c4087d68bc
commit 4fa646bae5

View file

@ -51,7 +51,8 @@ void A32Unicorn<TestEnvironment>::Run() {
return;
}
if (auto cerr_ = uc_emu_start(uc, pc, END_ADDRESS, 0, 1)) {
ASSERT_MSG(false, "uc_emu_start failed @ {:08x} (code = {:08x}) with error {} ({})", pc, testenv.MemoryReadCode(pc), cerr_, uc_strerror(cerr_));
fmt::print("uc_emu_start failed @ {:08x} (code = {:08x}) with error {} ({})", pc, testenv.MemoryReadCode(pc), cerr_, uc_strerror(cerr_));
throw "A32Unicorn::Run() failure";
}
testenv.ticks_left--;
if (!testenv.interrupts.empty() || testenv.code_mem_modified_by_guest) {