Ver código fonte

return empty list from getsubtreeaslist instead of error

Martin Kunz 10 meses atrás
pai
commit
cbee28bf56
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      src/ua/AddressSpace.ts

+ 1 - 1
src/ua/AddressSpace.ts

@@ -30,7 +30,7 @@ export class AddressSpace implements IAddressSpace{
     public getSubTreeAsList(nodeId: string): UABaseNode[] {
         const node=this.findNode(nodeId);
         if(!node)
-            throw new Error(`Nodeid ${nodeId} not found`)
+            return [];
         const nlist:UABaseNode[]=[node];
         for(const n of node.getChildren()) {
             const list=this.getSubTreeAsList(n.nodeId.toString());