ret = sqlite3_step(stmt);
if (ret != SQLITE_ROW) {
- _E("step error: %s", sqlite3_errmsg(db));
sqlite3_finalize(stmt);
sqlite3_close_v2(db);
/* TODO: which error should be set? */
- set_last_result(ret == SQLITE_DONE ? WIDGET_ERROR_NOT_EXIST :
- WIDGET_ERROR_FAULT);
+ if (ret == SQLITE_DONE) {
+ set_last_result(WIDGET_ERROR_NOT_EXIST);
+ LOGW("No data for uid (%d)", uid);
+ } else {
+ set_last_result(WIDGET_ERROR_FAULT);
+ _E("step error: %s", sqlite3_errmsg(db));
+ }
return NULL;
}
ret = sqlite3_step(stmt);
if (ret != SQLITE_ROW) {
- _E("step error: %s", sqlite3_errmsg(db));
sqlite3_finalize(stmt);
sqlite3_close_v2(db);
/* TODO: which error should be set? */
- set_last_result(ret == SQLITE_DONE ? WIDGET_ERROR_NOT_EXIST :
- WIDGET_ERROR_FAULT);
+ if (ret == SQLITE_DONE) {
+ set_last_result(WIDGET_ERROR_NOT_EXIST);
+ LOGW("No data for uid (%d)", uid);
+ } else {
+ set_last_result(WIDGET_ERROR_FAULT);
+ _E("step error: %s", sqlite3_errmsg(db));
+ }
return NULL;
}
ret = sqlite3_step(stmt);
if (ret != SQLITE_ROW) {
- _E("step error: %s", sqlite3_errmsg(db));
sqlite3_finalize(stmt);
sqlite3_close_v2(db);
/* TODO: which error should be set? */
- set_last_result(ret == SQLITE_DONE ? WIDGET_ERROR_NOT_EXIST :
- WIDGET_ERROR_FAULT);
+ if (ret == SQLITE_DONE) {
+ set_last_result(WIDGET_ERROR_NOT_EXIST);
+ LOGW("No data for uid (%d)", uid);
+ } else {
+ set_last_result(WIDGET_ERROR_FAULT);
+ _E("step error: %s", sqlite3_errmsg(db));
+ }
return 0;
}
ret = sqlite3_step(stmt);
if (ret != SQLITE_ROW) {
- _E("step error: %s", sqlite3_errmsg(db));
sqlite3_finalize(stmt);
sqlite3_close_v2(db);
- if (ret == SQLITE_DONE)
- return WIDGET_ERROR_NOT_EXIST;
-
- return WIDGET_ERROR_FAULT;
+ if (ret == SQLITE_DONE) {
+ LOGW("No data for uid (%d)", uid);
+ return WIDGET_ERROR_NOT_EXIST;
+ } else {
+ _E("step error: %s", sqlite3_errmsg(db));
+ return WIDGET_ERROR_FAULT;
+ }
}
_get_column_double(stmt, 0, period);
ret = sqlite3_step(stmt);
if (ret != SQLITE_ROW) {
- _E("step error: %s", sqlite3_errmsg(db));
sqlite3_finalize(stmt);
sqlite3_close_v2(db);
/* TODO: which error should be set? */
- set_last_result(ret == SQLITE_DONE ? WIDGET_ERROR_NOT_EXIST :
- WIDGET_ERROR_FAULT);
+ if (ret == SQLITE_DONE) {
+ set_last_result(WIDGET_ERROR_NOT_EXIST);
+ LOGW("No data for uid (%d)", uid);
+ } else {
+ set_last_result(WIDGET_ERROR_FAULT);
+ _E("step error: %s", sqlite3_errmsg(db));
+ }
return NULL;
}
ret = sqlite3_step(stmt);
if (ret != SQLITE_ROW) {
if (ret == SQLITE_DONE)
- _E("cannot find widget_id for pkg_id %s", pkg_id);
+ LOGW("cannot find widget_id for pkg_id %s, uid(%d)"
+ , pkg_id, uid);
else
_E("step error: %s", sqlite3_errmsg(db));
sqlite3_finalize(stmt);
ret = sqlite3_step(stmt);
if (ret != SQLITE_ROW) {
if (ret == SQLITE_DONE)
- _E("cannot find icon for widget %s", widget_id);
+ LOGW("cannot find icon for widget_id %s, uid(%d)"
+ , widget_id, uid);
else
_E("step error: %s", sqlite3_errmsg(db));
sqlite3_finalize(stmt);
ret = sqlite3_step(stmt);
if (ret != SQLITE_ROW) {
if (ret == SQLITE_DONE)
- _E("cannot find label for widget %s", widget_id);
+ LOGW("cannot find label for widget_id %s, uid(%d)"
+ , widget_id, uid);
else
_E("step error: %s", sqlite3_errmsg(db));
_E("step error: %s", sqlite3_errmsg(db));
ret = sqlite3_step(stmt);
if (ret != SQLITE_ROW) {
- _E("step error: %s", sqlite3_errmsg(db));
sqlite3_finalize(stmt);
sqlite3_close_v2(db);
/* TODO: which error should be set? */
- set_last_result(ret == SQLITE_DONE ? WIDGET_ERROR_NOT_EXIST :
- WIDGET_ERROR_FAULT);
+ if (ret == SQLITE_DONE) {
+ set_last_result(WIDGET_ERROR_NOT_EXIST);
+ LOGW("No data for uid (%d)", uid);
+ } else {
+ set_last_result(WIDGET_ERROR_FAULT);
+ _E("step error: %s", sqlite3_errmsg(db));
+ }
return NULL;
}
ret = sqlite3_step(stmt);
if (ret != SQLITE_ROW) {
- _E("step error: %s", sqlite3_errmsg(db));
sqlite3_finalize(stmt);
sqlite3_close_v2(db);
- if (ret == SQLITE_DONE)
+ if (ret == SQLITE_DONE) {
+ LOGW("No data for uid (%d)", uid);
return WIDGET_ERROR_NOT_EXIST;
-
- return WIDGET_ERROR_FAULT;
+ } else {
+ _E("step error: %s", sqlite3_errmsg(db));
+ return WIDGET_ERROR_FAULT;
+ }
}
_get_column_int(stmt, 0, &max_instance);