mirror of
https://github.com/YimMenu/YimMenuV2.git
synced 2026-10-10 03:43:15 +08:00
fix(hooking): add better error handling
This commit is contained in:
@@ -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!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user