Re-add the ad-hoc command the was removed by mistake in the previous commit
Thank you, e2e tests
This commit is contained in:
@@ -17,6 +17,9 @@ const std::map<const std::string, const AdhocCommand>& AdhocCommandsHandler::get
|
||||
|
||||
void AdhocCommandsHandler::add_command(std::string name, AdhocCommand command)
|
||||
{
|
||||
const auto found = this->commands.find(name);
|
||||
if (found != this->commands.end())
|
||||
throw std::runtime_error("Trying to add an ad-hoc command that already exist: "s + name);
|
||||
this->commands.emplace(std::make_pair(std::move(name), std::move(command)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user