The Vconf::Get<T> can throw an exception. This patch adds an exception
handling to prevent a crash issue.
Change-Id: I96943d2e02b898bf07881d6327f303a923d4a2f7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
}
bool MemoryMonitor::IsLowMemory() {
- if (low_vconf_.Get<int>() >=
- Config::GetInst().GetMemoryStatus().GetLowValue())
- return true;
+ try {
+ if (low_vconf_.Get<int>() >=
+ Config::GetInst().GetMemoryStatus().GetLowValue())
+ return true;
+ } catch (const Exception& e) {
+ _E("Exception occurs. error(%s)", e.what());
+ }
if (threshold_ == 100)
return false;