Commit 91359c50 authored by Alessio Netti's avatar Alessio Netti
Browse files

Analytics: small changes (2)

- Added checks in UnitGenerator
parent 1b969731
......@@ -224,7 +224,7 @@ public:
continue;
}
}
if(ondemand) {
shared_ptr<UnitTemplate<SBase>> unPtr = make_shared<UnitTemplate<SBase>>(SensorNavigator::templateKey, inputs, outputs);
unPtr->setInputMode(inputMode);
......@@ -232,6 +232,11 @@ public:
}
delete units;
if(unitObjects->empty()) {
delete unitObjects;
throw invalid_argument("UnitGenerator: No units were created!");
}
return unitObjects;
}
......
Supports Markdown
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