forked from MapComplete/MapComplete
Themes: improve error messages
This commit is contained in:
parent
1cf2a94d8e
commit
6897b88817
1 changed files with 8 additions and 1 deletions
|
@ -1012,6 +1012,13 @@ class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJson> {
|
||||||
) {
|
) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if(json.freeform.key.indexOf("wikidata")>=0){
|
||||||
|
context
|
||||||
|
.enter("render")
|
||||||
|
.err(
|
||||||
|
`The rendering for language ${ln} does not contain \`{${json.freeform.key}}\`. Did you perhaps forget to set "freeform.type: 'wikidata'"?`
|
||||||
|
)
|
||||||
|
}
|
||||||
context
|
context
|
||||||
.enter("render")
|
.enter("render")
|
||||||
.err(
|
.err(
|
||||||
|
@ -1264,7 +1271,7 @@ export class PrevalidateLayer extends DesugaringStep<LayerConfigJson> {
|
||||||
// It is tempting to add an index to this warning; however, due to labels the indices here might be different from the index in the tagRendering list
|
// It is tempting to add an index to this warning; however, due to labels the indices here might be different from the index in the tagRendering list
|
||||||
context
|
context
|
||||||
.enter("tagRenderings")
|
.enter("tagRenderings")
|
||||||
.err("Some tagrenderings have a duplicate id: " + duplicates.join(", "))
|
.err("Some tagrenderings have a duplicate id: " + duplicates.join(", ")+"\n"+JSON.stringify(json.tagRenderings.filter(tr=> duplicates.indexOf(tr["id"])>=0)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue