forked from MapComplete/MapComplete
Improve error output
This commit is contained in:
parent
ca1e4eba29
commit
27d99a2953
1 changed files with 1 additions and 1 deletions
|
@ -729,7 +729,7 @@ export class TagUtils {
|
||||||
}
|
}
|
||||||
if (typeof json != "string") {
|
if (typeof json != "string") {
|
||||||
if (json["and"] !== undefined && json["or"] !== undefined) {
|
if (json["and"] !== undefined && json["or"] !== undefined) {
|
||||||
throw `Error while parsing a TagConfig: got an object where both 'and' and 'or' are defined. Did you override a value? Perhaps use \`"=parent": { ... }\` instead of \"parent": {...}\` to trigger a replacement and not a fuse of values`
|
throw `Error while parsing a TagConfig: got an object where both 'and' and 'or' are defined. Did you override a value? Perhaps use \`"=parent": { ... }\` instead of \"parent": {...}\` to trigger a replacement and not a fuse of values. The value is ${JSON.stringify(json)}`
|
||||||
}
|
}
|
||||||
if (json["and"] !== undefined) {
|
if (json["and"] !== undefined) {
|
||||||
return new And(json["and"].map((t) => TagUtils.Tag(t, context)))
|
return new And(json["and"].map((t) => TagUtils.Tag(t, context)))
|
||||||
|
|
Loading…
Reference in a new issue