Skip to content

Commit

Permalink
ioc: improve group processing warning messages. (#90)
Browse files Browse the repository at this point in the history
* ioc: improve group processing warning messages.

Missing newlines and quotes made it hard to parse warning messages.
  • Loading branch information
ericonr authored Dec 12, 2024
1 parent 8502f91 commit fb4a3b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ioc/groupconfigprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void GroupConfigProcessor::defineFields(GroupDefinition& groupDefinition, const
}

if(fieldName.empty() && fieldConfig.info.type!=MappingInfo::Meta) {
fprintf(stderr, "%s.%s Error: only +type:\"meta\" map be mapped at struct top\n",
fprintf(stderr, "%s.%s Error: only +type:\"meta\" can be mapped at struct top\n",
groupName.c_str(), fieldName.c_str());
continue;
}
Expand Down
8 changes: 3 additions & 5 deletions ioc/groupprocessorcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ void GroupProcessorContext::assign(const Value& value) {
groupPvConfig.structureId = value.as<std::string>();

} else {
groupConfigProcessor->groupProcessingWarnings += "Unknown group option ";
groupConfigProcessor->groupProcessingWarnings += field;
groupConfigProcessor->groupProcessingWarnings += SB()<<"Unknown group option: \""<<field<<"\"\n";
}
field.clear();

Expand All @@ -59,7 +58,7 @@ void GroupProcessorContext::assign(const Value& value) {
} else if(tname == "const") {
type = MappingInfo::Const;
} else {
groupConfigProcessor->groupProcessingWarnings += SB()<<"Unknown mapping +type:\""<<tname<<"\" ignored";
groupConfigProcessor->groupProcessingWarnings += SB()<<"Unknown mapping +type:\""<<tname<<"\" ignored\n";
}
groupField.info.type = type;

Expand All @@ -82,8 +81,7 @@ void GroupProcessorContext::assign(const Value& value) {
groupField.info.cval = value;

} else {
groupConfigProcessor->groupProcessingWarnings += "Unknown group field option ";
groupConfigProcessor->groupProcessingWarnings += field + ":" + key;
groupConfigProcessor->groupProcessingWarnings += SB()<<"Unknown group field option: \""<<field<<":"<<key<<"\"\n";
}
key.clear();
}
Expand Down

0 comments on commit fb4a3b9

Please sign in to comment.