Add a RuntimeError hook called when a runtime_error exception is catched at client level
This commit is contained in:
parent
3883bffacc
commit
abe37b5fdb
|
@ -64,6 +64,7 @@ void ClientManager::create_client(std::unique_ptr<UserInterface>&& ui,
|
||||||
catch (Kakoune::runtime_error& error)
|
catch (Kakoune::runtime_error& error)
|
||||||
{
|
{
|
||||||
context->print_status(error.description());
|
context->print_status(error.description());
|
||||||
|
context->hooks().run_hook("RuntimeError", error.description(), *context);
|
||||||
}
|
}
|
||||||
catch (Kakoune::client_removed&)
|
catch (Kakoune::client_removed&)
|
||||||
{
|
{
|
||||||
|
@ -80,6 +81,7 @@ void ClientManager::create_client(std::unique_ptr<UserInterface>&& ui,
|
||||||
catch (Kakoune::runtime_error& error)
|
catch (Kakoune::runtime_error& error)
|
||||||
{
|
{
|
||||||
context->print_status(error.description());
|
context->print_status(error.description());
|
||||||
|
context->hooks().run_hook("RuntimeError", error.description(), *context);
|
||||||
}
|
}
|
||||||
catch (Kakoune::client_removed&)
|
catch (Kakoune::client_removed&)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user