HookManager: write to debug when a hook fails

This commit is contained in:
Maxime Coste 2013-04-11 13:58:09 +02:00
parent 35d0d5b2ea
commit 4cf7c4175a

View File

@ -1,5 +1,7 @@
#include "hook_manager.hh" #include "hook_manager.hh"
#include "debug.hh"
namespace Kakoune namespace Kakoune
{ {
@ -25,7 +27,10 @@ void HookManager::run_hook(const String& hook_name,
{ {
hook(param, context); hook(param, context);
} }
catch (runtime_error&) {} catch (runtime_error& err)
{
write_debug("error running hook " + hook_name + ": " + err.what());
}
} }
} }