diff --git a/src/nub.ts b/src/nub.ts index b53b73f6a6cfdb1216435f883419d178ad1b279c..2cdd6c3e9cd4b2c9475d00bb6a95859530f0e579 100644 --- a/src/nub.ts +++ b/src/nub.ts @@ -841,7 +841,11 @@ export abstract class Nub extends ComputeNode implements IObservable { // formulaire dont le Nub est la cible du lien const destNub = Session.getInstance().findNubByUid(p.targetNub); if (destNub) { - param.defineReference(destNub, p.targetParam); + try { + param.defineReference(destNub, p.targetParam); + } catch (err) { + console.error("fixLinks: defineReference error"); + } } else { // quit console.error("fixLinks : cannot find target Nub"); diff --git a/src/param/param-definition.ts b/src/param/param-definition.ts index 0b9da88b47128a28b1fbb9d16af27189894b503d..be4a088010e87c9bbacbe18244cc7017c0318663 100644 --- a/src/param/param-definition.ts +++ b/src/param/param-definition.ts @@ -810,7 +810,11 @@ export class ParamDefinition implements INamedIterableValues, IObservable { // when loading parent Nub, setting mode to CALC would prevent ensuring // consistency when setting calculatedParam afterwards if (mode !== ParamValueMode.CALCUL || setCalcMode) { - this.valueMode = mode; + try { + this.valueMode = mode; + } catch (err) { + console.error("loadObjectRepresentation: set valueMode error"); + } } // detect if this is the calculated param - used by Nub.loadObjectRepresentation() @@ -842,7 +846,11 @@ export class ParamDefinition implements INamedIterableValues, IObservable { // formulaire dont le Nub est la cible du lien const destNub = Session.getInstance().findNubByUid(obj.targetNub); if (destNub) { - this.defineReference(destNub, obj.targetParam); + try { + this.defineReference(destNub, obj.targetParam); + } catch (err) { + console.error("loadObjectRepresentation: defineReference error"); + } } // si la cible du lien n'existe pas, Session.fixLinks() est censé s'en occuper break;