Commit 78c87c65 authored by Carla Guillen's avatar Carla Guillen

More meaningful error messages for misconfigurations.

parent bc25182d
......@@ -165,13 +165,18 @@ bool endsWith (std::string const &fullString, std::string const &ending) {
void SMUCNGPerfConfigurator::sensorBase(SMUCSensorBase& s, CFG_VAL config) {
std::string name = s.getName();
bool found = false;
for (auto & kv : _metricMap) {
if(endsWith(name,kv.first)) {
found = true;
_metricToPosition[kv.second] = _vector_position;
s.setMetric(kv.second);
break;
}
}
if(!found){
LOG(error) << "Unable to configure sensor "<< name << " no match in _metricMap found.";
}
_vector_position++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment