"d::org.tizen.appfw.service.tizen_action_plugin_manager") {}
PluginExecutor::~PluginExecutor() {
- if (connected_)
- plugin_manager_.Disconnect();
+ try {
+ if (connected_)
+ plugin_manager_.Disconnect();
+ } catch (const rpc_port::plugin_manager_proxy::proxy::InvalidIDException& e) {
+ LOG(ERROR) << "InvalidIDException on Disconnect()";
+ }
}
int PluginExecutor::Execute(const common::ActionModel& model) {
auto proxy = con->GetProxy();
auto actions = proxy->ListActions();
- for (auto action : actions) {
+ for (const auto& action : actions) {
common::ActionSchema schema(action.Getjson());
if (!cb(static_cast<action_h>(&schema), user_data))
break;
if (connected_) {
user_callbacks_.clear();
UnregisterInternalCallback();
- proxy_->Disconnect();
+ try {
+ proxy_->Disconnect();
+ } catch (const rpc::proxy::InvalidIDException& e) {
+ LOG(ERROR) << "InvalidIDException on Disconnect()";
+ }
}
}
if (cb_id_ < 0)
return;
- proxy_->UnregisterActionReplyCb(cb_id_);
- cb_id_ = -1;
+ try {
+ proxy_->UnregisterActionReplyCb(cb_id_);
+ cb_id_ = -1;
+ } catch (const rpc::proxy::NotConnectedSocketException& e) {
+ LOG(ERROR) << "NotConnectedSocketException on UnregisterActionReplyCb";
+ } catch (const rpc::proxy::InvalidIOException& e) {
+ LOG(ERROR) << "InvalidIOException on UnregisterActionReplyCb";
+ } catch (const rpc::proxy::RemoteException& e) {
+ LOG(ERROR) << "RemoteException on UnregisterActionReplyCb";
+ }
}
void Connector::RegisterUserCallback(int execution_id, action_result_cb cb,
LOG(DEBUG) << "Parased action for pkgid[ " << pkgid << " ] : " << name;
LOG(DEBUG) << json;
- return ActionSchema(std::move(pkgid), std::move(name), std::move(category),
+ return ActionSchema(pkgid, std::move(name), std::move(category),
std::move(privs), std::move(json));
}
try {
auto actions = proxy_.ListActions();
_D("Actions cnt(%zu)", actions.size());
- for (auto action : actions) {
+ for (const auto& action : actions) {
_D("id: %s --------------------", action.Getaction_id().c_str());
_D("type: %s", action.Gettype().c_str());
_D("category: %s", action.Getcategory().c_str());