add try/catch in destructor 91/297291/1 accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/8.0/unified/20231005.093312 accepted/tizen/unified/20230816.170108 tizen_8.0_m2_release
authorYoungjae Shin <yj99.shin@samsung.com>
Wed, 16 Aug 2023 10:00:31 +0000 (19:00 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Wed, 16 Aug 2023 10:00:31 +0000 (19:00 +0900)
Change-Id: I2ea99c594847214c0f1f27e4c1d6642441c84313

src/server/publisher/UserActivity.cpp

index 8077f46..07a162f 100644 (file)
@@ -224,7 +224,11 @@ ActivityWalking::ActivityWalking(uid_t uid)
 
 ActivityWalking::~ActivityWalking()
 {
-       unsubscribe();
+       try {
+               unsubscribe();
+       } catch (...) {
+               _E("Failed to unsubscribe");
+       }
        _D("Destroyed");
 }
 
@@ -260,7 +264,12 @@ ActivityRunning::ActivityRunning(uid_t uid)
 
 ActivityRunning::~ActivityRunning()
 {
-       unsubscribe();
+       try {
+               unsubscribe();
+       } catch (...) {
+               _E("Failed to unsubscribe");
+       }
+
        _D("Destroyed");
 }
 
@@ -296,7 +305,11 @@ ActivityInVehicle::ActivityInVehicle(uid_t uid)
 
 ActivityInVehicle::~ActivityInVehicle()
 {
-       unsubscribe();
+       try {
+               unsubscribe();
+       } catch (...) {
+               _E("Failed to unsubscribe");
+       }
        _D("Destroyed");
 }