Add a RuntimeError hook called when a runtime_error exception is catched at client level

This commit is contained in:
Maxime Coste 2013-03-20 19:07:06 +01:00
parent 3883bffacc
commit abe37b5fdb

View File

@ -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&)
{ {