Skip to content

Commit

Permalink
UAVariable#typeDefinitionObj - handle Type mismatch more softly
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon committed Jul 7, 2023
1 parent fba2813 commit f6831cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/node-opcua-address-space/src/ua_variable_impl.ts
Expand Up @@ -327,10 +327,10 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
get typeDefinitionObj(): UAVariableType {
// istanbul ignore next
if (super.typeDefinitionObj && super.typeDefinitionObj.nodeClass !== NodeClass.VariableType) {
console.log(super.typeDefinitionObj.toString());
throw new Error(
"Invalid type definition node class , expecting a VariableType got " + NodeClass[super.typeDefinitionObj.nodeClass]
);
// this could happen in faulty external nodeset and has been seen once
// in an nano server
warningLog(super.typeDefinitionObj.toString());
return this.addressSpace.findVariableType("BaseVariableType")!;
}
return super.typeDefinitionObj as UAVariableType;
}
Expand Down

0 comments on commit f6831cc

Please sign in to comment.