Skip to content
Snippets Groups Projects
Commit 71b3335d authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Better error reporting for the YAML parser

parent 9e9908be
No related branches found
No related tags found
1 merge request!313WIP: Resolve "Processor constructors and creators requiring a sensor pointer?"
Pipeline #4230 passed
......@@ -386,7 +386,7 @@ void ParserYAML::parseFirstLevel(std::string file){
_paramsSens.push_back(pSensor);
}
} catch(YAML::InvalidNode& e){
throw std::runtime_error("Error parsing sensors. Please make sure that each sensor entry has 'type' and 'name' entries.");
throw std::runtime_error("Error parsing sensors @" + generatePath(file) + ". Please make sure that each sensor entry has 'type' and 'name' entries.");
}
try{
for(const auto& kv : n_config["processors"]){
......@@ -394,7 +394,7 @@ void ParserYAML::parseFirstLevel(std::string file){
_paramsProc.push_back(pProc);
}
} catch(YAML::InvalidNode& e){
throw std::runtime_error("Error parsing processors. Please make sure that each processor has 'type', 'name' and 'sensor_name' entries.");
throw std::runtime_error("Error parsing processors @" + generatePath(file) + ". Please make sure that each processor has 'type', 'name' and 'sensor_name' entries.");
}
for(const auto& kv : n_config["callbacks"]){
_callbacks.push_back({{kv[0].as<std::string>(), kv[1].as<std::string>(), kv[2].as<std::string>()}});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment