Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
624f0431
Commit
624f0431
authored
Sep 19, 2019
by
Alessio Netti
Browse files
Analytics: small fix to UnitGenerator
- Now throws invalid_argument instead of domain_error
parent
954e4e3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
analytics/includes/UnitGenerator.h
View file @
624f0431
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment