test multiple xmlfiles in error

This commit is contained in:
2020-12-22 21:11:14 +01:00
parent 90bd72de69
commit 0e08757e22
7 changed files with 47 additions and 4 deletions

View File

@ -1064,7 +1064,8 @@ class ConstraintAnnotator:
fill = fills[idx]
# test if it's redefined calculation
if fill.target in targets and not fill.redefine:
raise DictConsistencyError(_(f"A fill already exists for the target: {fill.target}"))
xmlfiles = self.objectspace.display_xmlfiles(fill.xmlfiles)
raise DictConsistencyError(_(f'A fill already exists for the target of "{fill.target}" created in {xmlfiles}'))
targets.append(fill.target)
#
if fill.name not in self.functions:

View File

@ -323,8 +323,7 @@ class CreoleObjSpace:
) -> str:
if len(xmlfiles) == 1:
return '"' + xmlfiles[0] + '"'
else:
return '"' + '", "'.join(xmlfiles[:-1]) + '"' + ' and ' + '"' + xmlfiles[-1] + '"'
return '"' + '", "'.join(xmlfiles[:-1]) + '"' + ' and ' + '"' + xmlfiles[-1] + '"'
def create_tree_structure(self,
space,