Remove gsl::finally only use

This commit is contained in:
Nekotekina 2019-11-09 19:11:01 +03:00
parent 0d629743ca
commit 191675bf31
1 changed files with 13 additions and 3 deletions

View File

@ -839,7 +839,7 @@ void ppu_thread::fast_call(u32 addr, u32 rtoc)
return fmt::format("%s [0x%08x]", thread_ctrl::get_name(), _this->cia);
};
auto at_ret = gsl::finally([&]()
auto at_ret = [&]()
{
if (std::uncaught_exceptions())
{
@ -866,9 +866,19 @@ void ppu_thread::fast_call(u32 addr, u32 rtoc)
current_function = old_func;
g_tls_log_prefix = old_fmt;
}
});
};
exec_task();
try
{
exec_task();
}
catch (...)
{
at_ret();
throw;
}
at_ret();
}
u32 ppu_thread::stack_push(u32 size, u32 align_v)