fix(hooking): add better error handling

This commit is contained in:
maybegreat48
2025-07-10 17:39:13 -04:00
parent dd6907bf14
commit 99421d5b01
+1
View File
@@ -42,6 +42,7 @@ namespace YimMenu
if (const auto result = MH_CreateHook(m_TargetFunc, m_DetourFunc, &m_OriginalFunc); result != MH_OK)
{
LOGF(FATAL, "Failed to create hook {}", name);
throw std::runtime_error("Failed to create hook!");
}
}