!150 json文件配置label错误的情况下,构建报错信息需要优化

Merge pull request !150 from liduo/error_msg_optimize
This commit is contained in:
openharmony_ci
2024-05-23 11:10:23 +00:00
committed by Gitee
+3 -2
View File
@@ -88,7 +88,7 @@ uint32_t ReferenceParser::ParseRefInResourceItem(ResourceItem &resourceItem) con
if (IsStringOfResourceItem(resType)) {
data = string(reinterpret_cast<const char *>(resourceItem.GetData()), resourceItem.GetDataLength());
if (!ParseRefString(data, update)) {
cerr << "Error: " << NEW_LINE_PATH << resourceItem.GetFilePath() << endl;
cerr << "Error: please check JSON file." << NEW_LINE_PATH << resourceItem.GetFilePath() << endl;
return RESTOOL_ERROR;
}
if (!update) {
@@ -149,6 +149,7 @@ bool ReferenceParser::ParseRefJson(const string &from, const string &to)
}
bool needSave = false;
if (!ParseRefJsonImpl(root_, needSave)) {
cerr << "Error: please check JSON file." << NEW_LINE_PATH << from << endl;
return false;
}
@@ -179,7 +180,7 @@ bool ReferenceParser::ParseRefResourceItemData(const ResourceItem &resourceItem,
for (auto &content : contents) {
bool flag = false;
if (!ParseRefString(content, flag)) {
cerr << "Error: " << NEW_LINE_PATH << resourceItem.GetFilePath() << endl;
cerr << "Error: please check JSON file." << NEW_LINE_PATH << resourceItem.GetFilePath() << endl;
return false;
}
update = (update || flag);