diff options
author | Sunil Shetye | 2018-07-18 15:33:44 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-18 17:07:40 +0530 |
commit | 4d1e8bb193a7315a8fcfe1e09c33befdee660b7d (patch) | |
tree | 360c93b86402e468a69d22fe3187d0809b095587 /js/MatrixOp/MATRESH.js | |
parent | bfa780421678e897b17680f3e7c5db72d8ea8375 (diff) | |
download | sci2js-4d1e8bb193a7315a8fcfe1e09c33befdee660b7d.tar.gz sci2js-4d1e8bb193a7315a8fcfe1e09c33befdee660b7d.tar.bz2 sci2js-4d1e8bb193a7315a8fcfe1e09c33befdee660b7d.zip |
add throw after message()
Diffstat (limited to 'js/MatrixOp/MATRESH.js')
-rw-r--r-- | js/MatrixOp/MATRESH.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/MatrixOp/MATRESH.js b/js/MatrixOp/MATRESH.js index ed92363f..9e43baf7 100644 --- a/js/MatrixOp/MATRESH.js +++ b/js/MatrixOp/MATRESH.js @@ -54,23 +54,28 @@ function MATRESH() { var nin = size(this.l1); if (nout==0) { message("output must have at least one element"); + throw "user error"; var ok = false; } if (nin==0) { message("input must have at least one element"); + throw "user error"; var ok = false; } if (ok) { if (((this.out[1-1]>(this.l1[1-1]*this.l1[2-1])))) { message("the first dimension of the output is too big"); + throw "user error"; var ok = false; } if (((this.out[2-1]>(this.l1[1-1]*this.l1[2-1])))) { message("the second dimension of the output is too big"); + throw "user error"; var ok = false; } if ((((this.out[2-1]*this.out[1-1])>(this.l1[1-1]*this.l1[2-1])))) { message("the dimensions of the output are too big"); + throw "user error"; var ok = false; } } @@ -84,6 +89,7 @@ function MATRESH() { var it = 2; } else { message("Datatype is not supported"); + throw "user error"; var ok = false; } if (ok) { |