Fix: improve error message

This commit is contained in:
Pieter Vander Vennet 2023-12-12 03:42:56 +01:00
parent 5585f02cad
commit 7f6c1f06e2

View file

@ -301,10 +301,9 @@ export class TagUtils {
}
console.error("Invalid type to flatten the multiAnswer", tagsFilter)
throw (
"Invalid type to FlattenMultiAnswer, not one of RegexTag, Tag or And: " +
tagsFilter.asHumanString(false, false, {})
)
throw `Invalid type to FlattenMultiAnswer, not one of ${
allowRegex ? "RegexTag, " : ""
}Tag or And: ${tagsFilter.asHumanString(false, false, {})}`
}
return keyValues
}