From 953c9e6d1be0691423d9d4d1ce660a81d80b6b59 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Tue, 6 Aug 2019 10:55:46 +0200 Subject: [PATCH] Nub.getFamily() : protection against exception --- src/nub.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nub.ts b/src/nub.ts index 8f693b0a..e4809e58 100644 --- a/src/nub.ts +++ b/src/nub.ts @@ -1217,7 +1217,12 @@ export abstract class Nub extends ComputeNode implements IObservable { */ public getFamily(symbol: string): ParamFamily { // is it a parameter ? - const p = this.getParameter(symbol); + let p; + try { // SectionNub.getParameter() (for ex.) throws exceptions + p = this.getParameter(symbol); + } catch (e) { + // silent fail + } if (p) { return p.family; } -- GitLab