From: Rafal Walczyna Date: Tue, 23 Mar 2021 14:32:25 +0000 (+0100) Subject: [ML][single] Change InvalidValues to TypeMismatch X-Git-Tag: submit/tizen/20210324.052810^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=991db8acb46d636afadc0d25fa7265e83b6c63b4;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [ML][single] Change InvalidValues to TypeMismatch In case when no arguments are provided, TypeMismatch should be thrown. Verification: Tested in google chrome console. Change-Id: Iab1f606c8a731c096dd93f5e38b0ec4c9b6beb6f Signed-off-by: Rafal Walczyna --- diff --git a/src/ml/js/ml_common.js b/src/ml/js/ml_common.js index 9040d018..2d3bd31a 100755 --- a/src/ml/js/ml_common.js +++ b/src/ml/js/ml_common.js @@ -263,14 +263,14 @@ TensorsData.prototype.setTensorRawData = function() { if (!argsIndex.has.index) { throw new WebAPIException( - WebAPIException.INVALID_VALUES_ERR, + WebAPIException.TYPE_MISMATCH_ERR, 'Invalid parameter: index is undefined' ); } if (arguments.length < 2) { throw new WebAPIException( - WebAPIException.INVALID_VALUES_ERR, + WebAPIException.TYPE_MISMATCH_ERR, 'Invalid parameter: buffer is undefined' ); }