.With(std::move(b))
.SendSimply(AUL_SOCK_ASYNC);
if (fd < 0)
- THROW(aul_error_convert(fd));
+ THROW(fd);
app_pkt_t* pkt;
int ret = aul_sock_recv_reply_pkt(fd, &pkt);
int fd = AppRequest(COMP_CONTEXT_FOREACH, getuid())
.SendSimply(AUL_SOCK_ASYNC);
if (fd < 0)
- THROW(aul_error_convert(fd));
+ THROW(fd);
std::vector<std::unique_ptr<ComponentRunningContext>> contexts;
int ret = aul_sock_recv_pkt_with_cb(fd,
.With(std::move(b))
.SendSimply();
if (ret < 0)
- THROW(aul_error_convert(ret));
+ THROW(ret);
return ret;
}
ComponentInfo* CreateComponentInfoFromAppPacket(
app_pkt_t* pkt) {
if (pkt->cmd != APP_GET_INFO_OK)
- THROW(pkt->cmd);
+ THROW(aul_error_convert(pkt->cmd));
bundle* kb = nullptr;
if (pkt->opt & AUL_SOCK_BUNDLE) {
app_pkt_t* pkt = nullptr;
int ret = aul_sock_recv_reply_pkt(fd, &pkt);
if (ret < 0)
- THROW(ret);
+ THROW(aul_error_convert(ret));
auto pkt_auto = std::unique_ptr<app_pkt_t, decltype(std::free)*>(
pkt, std::free);
}
}, &component_infos);
if (ret < 0)
- THROW(ret);
+ THROW(aul_error_convert(ret));
return component_infos;
}
auto* info = static_cast<ComponentInfo*>(handle);
try {
auto* localized_info = info->GetLocalizedInfo(GetSystemLocale());
- if (localized_info == nullptr)
- return AUL_R_ENOENT;
+ if (localized_info == nullptr) {
+ localized_info = info->GetLocalizedInfo(kDefaultLocale);
+ if (localized_info == nullptr)
+ return AUL_R_ENOENT;
+ }
*icon = localized_info->GetIcon().c_str();
} catch (const Exception& e) {
auto* info = static_cast<ComponentInfo*>(handle);
try {
auto* localized_info = info->GetLocalizedInfo(GetSystemLocale());
- if (localized_info == nullptr)
- return AUL_R_ENOENT;
+ if (localized_info == nullptr) {
+ localized_info = info->GetLocalizedInfo(kDefaultLocale);
+ if (localized_info == nullptr)
+ return AUL_R_ENOENT;
+ }
*label = localized_info->GetLabel().c_str();
} catch (const Exception& e) {
auto* info = static_cast<ComponentInfo*>(handle);
auto* localized_info = info->GetLocalizedInfo(locale);
- if (localized_info == nullptr)
- return AUL_R_ENOENT;
+ if (localized_info == nullptr) {
+ localized_info = info->GetLocalizedInfo(kDefaultLocale);
+ if (localized_info == nullptr)
+ return AUL_R_ENOENT;
+ }
*label = localized_info->GetLabel().c_str();
return AUL_R_OK;