From fb4a3b9dd1ec11db33a2e8292e17847718d49ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira=20Rolim?= <34201958+ericonr@users.noreply.github.com> Date: Wed, 11 Dec 2024 21:31:26 -0300 Subject: [PATCH] ioc: improve group processing warning messages. (#90) * ioc: improve group processing warning messages. Missing newlines and quotes made it hard to parse warning messages. --- ioc/groupconfigprocessor.cpp | 2 +- ioc/groupprocessorcontext.cpp | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ioc/groupconfigprocessor.cpp b/ioc/groupconfigprocessor.cpp index ff814124a..9f5e39440 100644 --- a/ioc/groupconfigprocessor.cpp +++ b/ioc/groupconfigprocessor.cpp @@ -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; } diff --git a/ioc/groupprocessorcontext.cpp b/ioc/groupprocessorcontext.cpp index 07f18b3d2..60882846d 100644 --- a/ioc/groupprocessorcontext.cpp +++ b/ioc/groupprocessorcontext.cpp @@ -33,8 +33,7 @@ void GroupProcessorContext::assign(const Value& value) { groupPvConfig.structureId = value.as(); } else { - groupConfigProcessor->groupProcessingWarnings += "Unknown group option "; - groupConfigProcessor->groupProcessingWarnings += field; + groupConfigProcessor->groupProcessingWarnings += SB()<<"Unknown group option: \""<groupProcessingWarnings += SB()<<"Unknown mapping +type:\""<groupProcessingWarnings += SB()<<"Unknown mapping +type:\""<groupProcessingWarnings += "Unknown group field option "; - groupConfigProcessor->groupProcessingWarnings += field + ":" + key; + groupConfigProcessor->groupProcessingWarnings += SB()<<"Unknown group field option: \""<