Complication::Impl::~Impl() {
LOGI("complication destroy %d", complication_id_);
- if (subscribe_id_ > 0)
- ComplicationConnector::GetInst().UnSubscribeSignal(subscribe_id_);
+ if (subscribe_id_ > 0) {
+ try {
+ ComplicationConnector::GetInst().UnSubscribeSignal(subscribe_id_);
+ } catch (Exception &ex) {
+ LOGE("%s %d", ex.what(), ex.GetErrorCode());
+ }
+ }
if (periodic_timer_)
g_source_remove(periodic_timer_);
LOGI("cur idx %d, cur provider %s, cur type %d", impl_->cur_data_idx_,
impl_->cur_provider_id_.c_str(), impl_->cur_type_);
- ComplicationConnector::GetInst().UnSubscribeSignal(impl_->subscribe_id_);
+ try {
+ ComplicationConnector::GetInst().UnSubscribeSignal(impl_->subscribe_id_);
+ } catch (Exception &ex) {
+ LOGE("%s %d", ex.what(), ex.GetErrorCode());
+ return WATCHFACE_COMPLICATION_ERROR_IO_ERROR;
+ }
+
if (impl_->cur_type_ == NoData) {
impl_->subscribe_id_ = -1;
} else {