summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--installer/pkgmgr_installer_signal_agent.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/installer/pkgmgr_installer_signal_agent.cc b/installer/pkgmgr_installer_signal_agent.cc
index be1d656..227c3ad 100644
--- a/installer/pkgmgr_installer_signal_agent.cc
+++ b/installer/pkgmgr_installer_signal_agent.cc
@@ -161,11 +161,15 @@ static void __emit_signal_for_res_event(const char* signal, GVariant* gv) {
g_variant_get(extra_param, "(ia(si))", &error_code, &iter);
while (g_variant_iter_loop(iter, "(&si)", &path, &state))
path_info.emplace_back(path, state);
-
- signal_sender->AsyncResultForResource(signal, target_uid, req_id, pkgid, status,
- pkg_signal::ExtraData(error_code, std::move(path_info)));
g_variant_unref(extra_param);
g_variant_iter_free(iter);
+
+ try {
+ signal_sender->AsyncResultForResource(signal, target_uid, req_id, pkgid,
+ status, pkg_signal::ExtraData(error_code, std::move(path_info)));
+ } catch (...) {
+ LOGE("Exception occured");
+ }
}
static void __emit_signal_for_pkg_event(GVariant* gv) {
@@ -184,8 +188,13 @@ static void __emit_signal_for_pkg_event(GVariant* gv) {
std::vector<pkg_signal::PkgInfo> pkgs;
while (g_variant_iter_loop(iter, "(&s&s&s)", &pkgid, &appid, &pkg_type))
pkgs.emplace_back(pkg_signal::PkgInfo(pkgid, appid, pkg_type));
- signal_sender->AsyncResult("", target_uid, req_id, std::move(pkgs), key, val);
g_variant_iter_free(iter);
+
+ try {
+ signal_sender->AsyncResult("", target_uid, req_id, std::move(pkgs), key, val);
+ } catch (...) {
+ LOGE("Exception occured");
+ }
}
static gboolean __quit(gpointer user_data) {