[Features] Commit migrated from tv branch.
http://165.213.149.170/gerrit/#/c/78321/
[Verification] Code compiles.
Change-Id: I97029dd0964bf7ac229b2e23bf736b854aa6a600
Signed-off-by: Tomasz Marciniak <t.marciniak@samsung.com>
if ((APP_MANAGER_ERROR_NONE == ret) && (nullptr != tmp_str)) {
app_id = tmp_str;
} else {
- LoggerE("Failed to get application ID.");
+ LoggerE("Failed to get application ID: %d (%s)", ret, get_error_message(ret));
}
free(tmp_str);
if ((PACKAGE_MANAGER_ERROR_NONE == ret) && (nullptr != tmp_str)) {
package_id = tmp_str;
} else {
- LoggerE("Failed to get package ID.");
+ LoggerE("Can't get package name from app info: %d (%s)", ret, get_error_message(ret));
}
free(tmp_str);
app_info_h app_info;
int err = app_info_create(app_id.c_str(), &app_info);
if (APP_MANAGER_ERROR_NONE != err) {
- LoggerE("Can't create app info handle from appId (%s)", app_id.c_str());
+ LoggerE("Can't create app info handle from appId (%s): %d (%s)", app_id.c_str(), err,
+ get_error_message(err));
return nullptr;
}
SCOPE_EXIT {
int err = storage_foreach_device_supported(OnStorageDeviceSupported, nullptr);
- if (err != STORAGE_ERROR_NONE) {
- LoggerE("Unknown Error on getting storage paths");
+ if (STORAGE_ERROR_NONE != err) {
+ LoggerE("Unknown Error on getting storage paths %d (%s)", err, get_error_message(err));
}
int id = -1;
LoggerD("Enter");
char* platformPath = NULL;
int result = storage_get_directory(id, typeToCheck, &platformPath);
- if (result != STORAGE_ERROR_NONE) {
- LoggerD("Cannot retrieve path for type %i", typeToCheck);
+ if (STORAGE_ERROR_NONE != result) {
+ LoggerD("Cannot retrieve path for type %i: %d (%s)", typeToCheck, result,
+ get_error_message(result));
return std::string();
}
std::string path = std::string(platformPath);