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
07d1df53
Commit
07d1df53
authored
Dec 21, 2018
by
Micha Mueller
Browse files
Add error message if input from config file is unknown
parent
56c77a58
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/includes/ConfiguratorTemplate.h
View file @
07d1df53
...
...
@@ -101,7 +101,6 @@ public:
//read groups and templates for groups. If present also entity/-template stuff
BOOST_FOREACH
(
boost
::
property_tree
::
iptree
::
value_type
&
val
,
cfg
)
{
//TODO allow single sensors for convenience?
//template entity
if
(
boost
::
iequals
(
val
.
first
,
"template_"
+
_entityName
))
{
LOG
(
debug
)
<<
"Template "
<<
_entityName
<<
"
\"
"
<<
val
.
second
.
data
()
<<
"
\"
"
;
...
...
@@ -232,6 +231,9 @@ public:
delete
group
;
}
}
}
else
{
LOG
(
error
)
<<
"
\"
"
<<
val
.
first
<<
"
\"
: unknown construct!"
;
return
false
;
}
}
//read of config finished. Now we build the mqtt-topic for every sensor
...
...
src/sensors/perfevent/PerfeventConfigurator.cpp
View file @
07d1df53
...
...
@@ -175,7 +175,10 @@ bool PerfeventConfigurator::readConfig(std::string cfgPath) {
LOG
(
warning
)
<<
_groupName
<<
"
\"
"
<<
val
.
second
.
data
()
<<
"
\"
has bad values! Ignoring..."
;
}
}
}
}
else
{
LOG
(
error
)
<<
"
\"
"
<<
val
.
first
<<
"
\"
: unknown construct!"
;
return
false
;
}
}
//read of config finished. Now we build the mqtt-topic for every sensor
for
(
auto
g
:
_sensorGroups
)
{
...
...
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