HooksManager: do not propagate hooks runtime exception
This commit is contained in:
parent
1fd8ec8bfd
commit
e0b216d576
|
@ -17,7 +17,13 @@ void HooksManager::run_hook(const std::string& hook_name,
|
|||
return;
|
||||
|
||||
for (auto& hook : hook_list_it->second)
|
||||
hook(param, context);
|
||||
{
|
||||
try
|
||||
{
|
||||
hook(param, context);
|
||||
}
|
||||
catch (runtime_error&) {}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -464,11 +464,7 @@ IncrementalInserter::~IncrementalInserter()
|
|||
move_cursor(DisplayCoord(0, -1));
|
||||
|
||||
m_window.push_selections();
|
||||
try
|
||||
{
|
||||
m_window.hooks_manager().run_hook("InsertEnd", "", Context(m_window));
|
||||
}
|
||||
catch (runtime_error& e) {}
|
||||
m_window.hooks_manager().run_hook("InsertEnd", "", Context(m_window));
|
||||
m_window.pop_selections();
|
||||
|
||||
assert(m_window.m_current_inserter == this);
|
||||
|
|
Loading…
Reference in New Issue
Block a user