summaryrefslogtreecommitdiff
path: root/src/factories/BaseFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/factories/BaseFactory.h')
-rw-r--r--src/factories/BaseFactory.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/factories/BaseFactory.h b/src/factories/BaseFactory.h
index 1246c91..18c03ef 100644
--- a/src/factories/BaseFactory.h
+++ b/src/factories/BaseFactory.h
@@ -52,7 +52,11 @@ std::optional<T> GetNode(YAML::Node& node, const std::string& key) {
template<typename T>
T GetSafeNode(YAML::Node& node, const std::string& key) {
if(!node[key]) {
- throw std::runtime_error("Failed to find " + key + " in yaml");
+ if (node["symbol"]) {
+ throw std::runtime_error("Yaml asset missing the '" + key + "' node for '" + node["symbol"].as<std::string>() + "'");
+ } else {
+ throw std::runtime_error("Yaml asset missing the '" + key + "' node");
+ }
}
return node[key].as<T>();