From 45f050a346887cfd9476666e0ce02a52f4be2c80 Mon Sep 17 00:00:00 2001 From: Yimura Date: Fri, 23 Jul 2021 00:47:55 +0200 Subject: [PATCH] feat(Invoker): Added try except around native call --- BigBaseV2/src/invoker.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/BigBaseV2/src/invoker.cpp b/BigBaseV2/src/invoker.cpp index f8df7a4d..5f47b177 100644 --- a/BigBaseV2/src/invoker.cpp +++ b/BigBaseV2/src/invoker.cpp @@ -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 {