Skip to content

Commit

Permalink
add error message to better track ill-formed extension object in Node…
Browse files Browse the repository at this point in the history
…Set2.xml file #1200
  • Loading branch information
erossignon committed Sep 27, 2022
1 parent e36a2fd commit 3cb323f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,14 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
assert(self.extensionObject instanceof ExtensionObject);
break;
default: {
// istanbul ignore next
if (! this._cloneFragment) {
// the XML file is probably not exposing standard UA extension object correctly.
// this has been seen in some generated xml files using the dataType nodeId instead of the default encoding
// nodeid
errorLog("[NODE-OPCUA-E12] standard OPCUA Extension object from (namespace=0) has a invalid TypeId", self.typeDefinitionId.toString());
break;
}
this.bodyXML = this._cloneFragment!.value;
this._cloneFragment!.value = null;

Expand Down

0 comments on commit 3cb323f

Please sign in to comment.