Added additional check to verify environment node type

This commit is contained in:
Nav
2023-07-13 02:05:33 +01:00
parent 33aea9bd69
commit 184dd62652

View File

@@ -85,6 +85,10 @@ namespace Bloom
EnvironmentConfig::EnvironmentConfig(std::string name, const YAML::Node& environmentNode)
: name(std::move(name))
{
if (!environmentNode.IsMap()) {
throw Exceptions::InvalidConfig("Environment node must be in the form of a YAML mapping.");
}
if (!environmentNode["tool"]) {
throw Exceptions::InvalidConfig("Missing debug tool configuration.");
}