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 <r.walczyna@samsung.com>
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'
);
}