Commit 624f0431 authored by Alessio Netti's avatar Alessio Netti
Browse files

Analytics: small fix to UnitGenerator

- Now throws invalid_argument instead of domain_error
parent 954e4e3c
......@@ -311,12 +311,12 @@ public:
for (const auto &nodeName : nodes) {
// The unit specified as input must belong to the domain of the outputs
if (!nodeBelongsToPattern(nodeName, subOutputs[0]->getName()))
throw domain_error("HiUnitGenerator: Node " + nodeName + " does not belong to this unit domain!");
throw invalid_argument("HiUnitGenerator: Node " + nodeName + " does not belong to this unit domain!");
topUnit->addSubUnit(_generateUnit(nodeName, subInputs, subOutputs, inputMode, mqttPrefix, relaxed));
}
} catch(const invalid_argument& e) {
topUnit->clear();
throw invalid_argument("HiUnitGenerator: One or more node sub-units for unit" + name + " could not be generated!");
throw invalid_argument("HiUnitGenerator: One or more node sub-units for unit " + name + " could not be generated!");
}
// Mapping outputs
for(const auto& out : outputs) {
......
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