From bb688cf42d4e4d2fb78419f0824714145490afa3 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 11 Jul 2016 19:40:22 +0100 Subject: [PATCH] Do not throw when recursive hook calls are detected Running hooks is non critical, and should never `fail` as far as caller is concerned. --- src/hook_manager.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hook_manager.cc b/src/hook_manager.cc index bd83b976..30f90ae3 100644 --- a/src/hook_manager.cc +++ b/src/hook_manager.cc @@ -53,9 +53,9 @@ void HookManager::run_hook(StringView hook_name, 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); - throw runtime_error(std::move(error)); + return; } m_running_hooks.emplace_back(hook_name, param);