1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 01:11:36 +03:00

Throw when trying to remove a child highlighter that does not exists

This commit is contained in:
Maxime Coste 2018-03-20 05:35:15 +11:00
parent e444cd3937
commit 56237aa8f8

View File

@ -39,6 +39,8 @@ void HighlighterGroup::add_child(HighlighterAndId&& hl)
void HighlighterGroup::remove_child(StringView id)
{
if (not m_highlighters.contains(id))
throw runtime_error{format("no such child: {}", id)};
m_highlighters.remove(id);
}