ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
}
- if (!validator.checkArrayKeys(m_allowedContactInit, jsValue)) {
- LogError("invalid properties in ContactInit object");
- ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
- }
+// if (!validator.checkArrayKeys(m_allowedContactInit, jsValue)) {
+// LogError("invalid properties in ContactInit object");
+// ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
+// }
const ScopedJSStringRef nameStr(JSStringCreateWithUTF8CString(CONTACT_ATTRIBUTE_NAME));
const ScopedJSStringRef accountStr(JSStringCreateWithUTF8CString(CONTACT_ATTRIBUTE_ACCOUNT));
ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
}
- if (!validator.checkArrayKeys(m_allowedContactNameInit, jsValue)) {
- LogError("invalid properties in ContactNameInit object");
- ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
- }
+// if (!validator.checkArrayKeys(m_allowedContactNameInit, jsValue)) {
+// LogError("invalid properties in ContactNameInit object");
+// ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
+// }
const ScopedJSStringRef prefixStr(JSStringCreateWithUTF8CString(CONTACT_ATTRIBUTE_PREFIX));
const ScopedJSStringRef firstNameStr(JSStringCreateWithUTF8CString(CONTACT_ATTRIBUTE_FIRST_NAME));
ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
}
- if (!validator.checkArrayKeys(m_allowedContactOrganizationInit, jsValue)) {
- LogError("invalid properties in ContactOrganizationInit object");
- ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
- }
+// if (!validator.checkArrayKeys(m_allowedContactOrganizationInit, jsValue)) {
+// LogError("invalid properties in ContactOrganizationInit object");
+// ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
+// }
// NOTE: Currently not support office and logoURI fields
const ScopedJSStringRef nameStr(JSStringCreateWithUTF8CString(CONTACT_ATTRIBUTE_NAME));
ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
}
- if (!validator.checkArrayKeys(m_allowedContactAddressInit, jsValue)) {
- LogError("invalid properties in ContactAddressInit object");
- ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
- }
+// if (!validator.checkArrayKeys(m_allowedContactAddressInit, jsValue)) {
+// LogError("invalid properties in ContactAddressInit object");
+// ThrowMsg(WrtDeviceApis::Commons::ConversionException, "Wrong attribute");
+// }
const ScopedJSStringRef countryStr(JSStringCreateWithUTF8CString(CONTACT_ATTRIBUTE_COUNTRY));
const ScopedJSStringRef regionStr(JSStringCreateWithUTF8CString(CONTACT_ATTRIBUTE_REGION));
JSObjectRef jsObject = toJSObjectRef(jsValue);
for (std::size_t i = 0; i < JSGetArrayLength(m_context, jsObject); ++i) {
JSValueRef element = JSGetArrayElement(m_context, jsObject, i);
- result->push_back(toContactPhoneNumberType(element));
+ Try {
+ result->push_back(toContactPhoneNumberType(element));
+ } Catch (Exception) {
+ // nothing
+ }
}
return result;
}
JSObjectRef jsObject = toJSObjectRef(jsValue);
for (std::size_t i = 0; i < JSGetArrayLength(m_context, jsObject); ++i) {
JSValueRef element = JSGetArrayElement(m_context, jsObject, i);
- result->push_back(toContactEmailAddressType(element));
+ Try {
+ result->push_back(toContactEmailAddressType(element));
+ } Catch (Exception) {
+ // nothing
+ }
}
return result;
}