From 4d1e8bb193a7315a8fcfe1e09c33befdee660b7d Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Wed, 18 Jul 2018 15:33:44 +0530 Subject: add throw after message() --- js/Branching/MUX_f.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/Branching/MUX_f.js') diff --git a/js/Branching/MUX_f.js b/js/Branching/MUX_f.js index c4348b93..88a93747 100644 --- a/js/Branching/MUX_f.js +++ b/js/Branching/MUX_f.js @@ -31,6 +31,7 @@ function MUX_f() { if (size(this.in1,"*")==1) { if (this.in1<2||this.in1>8) { message("Block must have at least two input ports and at most eight"); + throw "user error"; var ok = false; } else { var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in1]),0,[],[]); @@ -41,6 +42,7 @@ function MUX_f() { } else { if (size(this.in1,"*")<2||size(this.in1,"*")>8||or(this.in1==0)) { message([["Block must have at least two input ports"],["and at most eight, and size 0 is not allowed. "]]); + throw "user error"; var ok = false; } else { if (min(this.in1)<0) { -- cgit