Commit 4baec300 authored by Grand Francois's avatar Grand Francois
Browse files

refactor: ParallelStructure.CalcQ: early return on error

refs #302
parent 073fe2a3
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
...@@ -116,6 +116,9 @@ export class ParallelStructure extends Nub { ...@@ -116,6 +116,9 @@ export class ParallelStructure extends Nub {
for (let i = 0; i < this._children.length; i++) { for (let i = 0; i < this._children.length; i++) {
if (i !== iExcept) { if (i !== iExcept) {
const res: Result = this._children[i].Calc("Q"); const res: Result = this._children[i].Calc("Q");
if (!res.ok) {
return res;
}
qTot += res.vCalc; qTot += res.vCalc;
// merge logs // merge logs
calcRes.resultElement.log.addLog(res.log); calcRes.resultElement.log.addLog(res.log);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment