Do not throw when recursive hook calls are detected

Running hooks is non critical, and should never `fail` as far as
caller is concerned.
This commit is contained in:
Maxime Coste 2016-07-11 19:40:22 +01:00
parent 530ecf212e
commit bb688cf42d

View File

@ -53,9 +53,9 @@ void HookManager::run_hook(StringView hook_name,
if (contains(m_running_hooks, std::make_pair(hook_name, param))) if (contains(m_running_hooks, std::make_pair(hook_name, param)))
{ {
auto error = format("recursive call of hook {}/{}, aborting", hook_name, param); auto error = format("recursive call of hook {}/{}, not executing", hook_name, param);
write_to_debug_buffer(error); write_to_debug_buffer(error);
throw runtime_error(std::move(error)); return;
} }
m_running_hooks.emplace_back(hook_name, param); m_running_hooks.emplace_back(hook_name, param);