N°8772 - Compiler: Add errors check

This commit is contained in:
Eric Espie
2025-12-11 14:10:50 +01:00
parent 41d15f1b33
commit 2b8de85af8
2 changed files with 41 additions and 1 deletions

View File

@@ -30,6 +30,8 @@ class Property extends AbstractProperty
$oValueTypeNode = $oDomNode->GetOptionalElement('value-type');
if ($oValueTypeNode) {
$this->oValueType = ValueTypeFactory::GetInstance()->CreateValueTypeFromDomNode($oValueTypeNode);
} else {
throw new PropertyTreeException("Node: {$this->sId}, missing value-type in node specification");
}
$this->sRelevanceCondition = $oDomNode->GetChildText('relevance-condition');
@@ -68,7 +70,7 @@ class Property extends AbstractProperty
}
$sBinding .= "\n ->AddInputDependsOn('{$sNode}.$sOutput', '$sNode', '$sOutput')";
} else {
// TODO Erreur field sans alias
throw new PropertyTreeException("Node: {$this->sId}, missing output or source in relevance condition: $sFieldToResolve");
}
}