feat(Invoker): Added try except around native call

This commit is contained in:
Yimura 2021-07-23 00:47:55 +02:00
parent 1233514bbb
commit 45f050a346

View File

@ -36,9 +36,16 @@ namespace big
{
rage::scrNativeHandler handler = it->second;
_call_asm(&m_call_context, handler, g_pointers->m_native_return);
// handler(&m_call_context);
g_pointers->m_fix_vectors(&m_call_context);
__try
{
_call_asm(&m_call_context, handler, g_pointers->m_native_return);
// handler(&m_call_context);
g_pointers->m_fix_vectors(&m_call_context);
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
[hash]() { LOG(WARNING) << "Exception caught while trying to call " << hash << " native."; }();
}
}
else
{