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/Sources/IN_f.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/Sources/IN_f.js') diff --git a/js/Sources/IN_f.js b/js/Sources/IN_f.js index 67fa7614..eddd05b6 100644 --- a/js/Sources/IN_f.js +++ b/js/Sources/IN_f.js @@ -42,10 +42,13 @@ function IN_f() { var prt = int(prt); if (prt<=0) { message("Port number must be a positive integer"); + throw "user error"; } else if (!isequal(size(otsz,"*"),2)) { message("Outport Size must be a 2 elements vector"); + throw "user error"; } else if (((ot<1||ot>9)&&(ot!=-1))) { message("Outport type must be a number between 1 and 9, or -1 for inheritance."); + throw "user error"; } else { if (this.model.ipar!=prt) { var needcompile = 4; -- cgit