show message when parse subtree error

This commit is contained in:
codetypes committed 2024-03-12 10:03:51 +08:00
1 parent 1013bb4f5e
commit fcf11a38cd
3 files changed
+3 -5

No files matched your search

+1 -1
View File
@@ -117,11 +117,11 @@ export const createTreeData = (bNode: BehaviorNodeModel, settings: Settings, par
try {
const subtreePath = settings.workdir + "/" + bNode.path;
const str = fs.readFileSync(subtreePath, "utf8");
console.log("read subtree:", subtreePath);
treeData = createTreeData(JSON.parse(str).root, settings, treeData.id);
treeData.path = bNode.path;
treeData.size = calcTreeNodeSize(treeData);
} catch (error) {
message.error(`解析子树失败:${bNode.path}`);
console.log("parse subtree:", error);
}
parsingStack.pop();