if (result == FAVORITES_ERROR_NONE)
return _getCompleteCB(searchData);
else if (result == FAVORITES_ERROR_DB_FAILED)
- throw IOException("DB Failed");
+ throw UnknownException("DB Failed");
else
throw UnknownException("Unknown Error");
}
else if (result == FAVORITES_ERROR_INVALID_PARAMETER)
throw InvalidValuesException("Wrong parameter");
else if (result == FAVORITES_ERROR_DB_FAILED)
- throw IOException("DB Failed");
+ throw UnknownException("DB Failed");
else if (result == FAVORITES_ERROR_NO_SUCH_FILE)
throw NotFoundException("Can't find the parent folder");
else
else if ((searchData->m_bookmark)->m_type == BOOKMARKITEM_TYPE)
result = favorites_bookmark_delete_bookmark((searchData->m_bookmark)->m_id);
else {
- result = favorites_bookmark_foreach(favorites_bookmark_foreach_cb, searchData.get());
- if (result == FAVORITES_ERROR_NONE) {
- std::vector<BookmarkDataPtr> deletebookmarks = _getCompleteCB(searchData);
- result = favorites_bookmark_delete_bookmark((searchData->m_bookmark)->m_id);
+ try {
+ result = favorites_bookmark_foreach(favorites_bookmark_foreach_cb, searchData.get());
if (result == FAVORITES_ERROR_NONE) {
- for (std::size_t i = 0; i < deletebookmarks.size(); ++i) {
- result = favorites_bookmark_delete_bookmark(deletebookmarks[i]->m_id);
- if (result != FAVORITES_ERROR_NONE)
- break;
+ std::vector<BookmarkDataPtr> deletebookmarks = _getCompleteCB(searchData);
+ result = favorites_bookmark_delete_bookmark((searchData->m_bookmark)->m_id);
+ if (result == FAVORITES_ERROR_NONE) {
+ for (std::size_t i = 0; i < deletebookmarks.size(); ++i) {
+ result = favorites_bookmark_delete_bookmark(deletebookmarks[i]->m_id);
+ if (result != FAVORITES_ERROR_NONE)
+ break;
+ }
}
}
+ } catch( const NotFoundException& err) {
+ LogDebug("Not Found");
+ return;
}
}
if (result == FAVORITES_ERROR_NONE)
return;
else if (result == FAVORITES_ERROR_DB_FAILED)
- throw IOException("DB Failed");
+ throw UnknownException("DB Failed");
else
throw UnknownException("Unknown Error");
}
std::vector<std::string> result;
const char **array;
int length = 0;
- size_t index = 0;
+ int index = 0;
array = appsvc_get_data_array(b, key.c_str(), &length);
MappedDataControlConsumer *consumer = NULL;
EventGetValuePtr event;
int count = 0;
- int index = 0;
+ size_t index = 0;
try
{
}
std::vector<std::string> result = getDataArrayFromBundle(b, OSP_K_ARG);
- for (size_t index = 0; index < result.size(); index++)
+ for (index = 0; index < result.size(); index++)
{
LogDebug(result[index]);
}
int type = 0;
int rowIndex = event->getIndex();
// move stream to current index
- size_t index = 0;
+ int index = 0;
std::vector<std::string> keys, values;
std::string data;
m_istream.seekg(dataStart, std::ios::beg);
- for (index = 0; index < m_headerInfo.size(); index++)
+ for (index = 0; index < (int)m_headerInfo.size(); index++)
{
keys.push_back(m_headerInfo[index].m_name);
}
m_istream.read((char*)&m_colCount, sizeof(int));
m_istream.read((char*)&m_colTotalSize, sizeof(int));
- size_t index = 0, j = 0;
+ int index = 0, j = 0;
char c;
for (index = 0; index < m_colCount; index++)
void SelectDataObject::moveOneRow()
{
int size = 0;
- size_t index = 0;
+ int index = 0;
if (m_istream.good() == false)
LogDebug("Error");
// appControl
JSValueRef appControl = JSUtil::getProperty(context, object, STATUS_NOTIFICATION_APP_CONTROL);
- priv->setApplicationControl(DeviceAPI::Application::JSApplicationControl::getApplicationControl(context, JSUtil::JSValueToObject(context,appControl)));
+ if (!JSValueIsUndefined(context, appControl) && !JSValueIsNull(context, appControl))
+ priv->setApplicationControl(DeviceAPI::Application::JSApplicationControl::getApplicationControl(context, JSUtil::JSValueToObject(context,appControl)));
// appId
JSValueRef appId = JSUtil::getProperty(context, object, STATUS_NOTIFICATION_APP_ID);