return WIDGET_ERROR_FAULT;
}
+ try {
+ auto contents_raw = const_cast<tizen_base::Bundle&>(contents).ToRaw();
+ impl_->content_ = std::string(
+ reinterpret_cast<char*>(contents_raw.first.get()));
+ } catch (const std::bad_alloc& e) {
+ impl_->content_ = "";
+ _E("Exception(%s) occurs", e.what());
+ }
+
return WIDGET_ERROR_NONE;
}
reason = DestroyType::PERMANENT;
}
- tizen_base::Bundle content_info = impl_->content_.empty() ?
- tizen_base::Bundle() : tizen_base::Bundle(impl_->content_);
+ tizen_base::Bundle content_info;
+ try {
+ if (!impl_->content_.empty())
+ content_info = tizen_base::Bundle(impl_->content_);
+ } catch (const std::bad_alloc& e) {
+ _E("Exception(%s) occurs", e.what());
+ }
OnDestroy(reason, content_info);