{
if (priv == NULL)
{
- Throw(WrtDeviceApis::Commons::InvalidArgumentException);
+ Throw(WrtDeviceApis::Commons::ConversionException);
}
BluetoothClassPtr btClass(priv->getObject());
{
JSBluetoothClassPriv* priv = static_cast<JSBluetoothClassPriv*>(JSObjectGetPrivate(thisObject));
-
+ JSValueRef reserveArgument = JSValueMakeUndefined(context);
+
try
{
if (priv == NULL)
{
LogError("priv null");
- Throw(WrtDeviceApis::Commons::UnknownException);
+ Throw(WrtDeviceApis::Commons::ConversionException);
}
- if (argumentCount != 1 || JSValueIsNull(context, arguments[0]) == true
- || JSValueIsNumber(context, arguments[0]) == false)
+ if (argumentCount >= 1)
{
- LogError("argument fail");
- Throw(WrtDeviceApis::Commons::InvalidArgumentException);
+ reserveArgument = arguments[0];
}
AceSecurityStatus status = BLUETOOTH_CHECK_ACCESS(
- priv->getContext(),
bluetoothExportedNames[BLUETOOTH_FUNCTION_API_BLUETOOTHCLASS_HAS_SERVICE]);
TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
return JSTizenExceptionFactory::postException(context, exception,
JSTizenException::INVALID_VALUES_ERROR, "invalid parameter error");
}
+ Catch (WrtDeviceApis::Commons::ConversionException)
+ {
+ LogError("TypemismatchException");
+ return JSTizenExceptionFactory::postException(context, exception,
+ JSTizenException::TYPE_MISMATCH_ERROR, "type mismatch error");
+ }
Catch (WrtDeviceApis::Commons::SecurityException)
{
LogError("permission denied error");