rework Cortana scripts to remove duplicates, better document and support Windows version 2004/2009 #43

This commit is contained in:
undergroundwires
2020-12-26 02:39:26 +01:00
parent e14bf2bfa0
commit 7cc161c828
3 changed files with 110 additions and 40 deletions

View File

@@ -38,7 +38,7 @@ function ensureValid(category: YamlCategory) {
throw Error('category is null or undefined');
}
if (!category.children || category.children.length === 0) {
throw Error('category has no children');
throw Error(`category has no children: "${category.category}"`);
}
if (!category.category || category.category.length === 0) {
throw Error('category has no name');