From 40e1a4a0764d4cbb7662c636af64fc9acfeccd5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Fri, 7 Apr 2023 14:44:30 +0200 Subject: [PATCH] refactor: parallel structures: propagate all errora/warnings encoutered in child structures refs #302 --- src/structure/parallel_structure.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/structure/parallel_structure.ts b/src/structure/parallel_structure.ts index 8a78dde5..e0d2facd 100644 --- a/src/structure/parallel_structure.ts +++ b/src/structure/parallel_structure.ts @@ -76,17 +76,10 @@ export class ParallelStructure extends Nub { } const res = super.CalcSerie(rInit); - // si des erreurs sont survenues dans les structures, on les propage + // si des erreurs/warnings sont survenus dans les structures, on les propage - const propagatedErrors = [MessageCode.ERROR_STRUCTURE_SUBMERGENCE_LOWER_THAN]; // erreurs propagées si on les rencontre for (const st of this.structures) { - const stLog = st.result.log; - for (const e of propagatedErrors) { - if (stLog.contains(e)) { - // this.result.resultElement.log.add(stLog.getMessage(e)); - this.result.globalLog.add(stLog.getMessage(e)); - } - } + this.result.globalLog.addLog(st.result.log); } return res; -- GitLab