Commit e41b6e2c authored by KIM JungYong's avatar KIM JungYong Committed by Uze Choi

Fix result of static analyzer in primitive service.

In this patch, unhandled exception in the RC and RE was handled.

Change-Id: If6337a3fa9e9cc2c3a3b055bffe384f90d6b555c
Signed-off-by: default avatarKIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18091Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent 2e064148
......@@ -722,9 +722,9 @@ int main(int argc, char *argv[])
cv.wait(lock);
}
catch (OCException &e)
catch (const OCException &e)
{
oclog() << "Exception in main: " << e.what();
std::cout << "Exception in main: " << e.what();
}
return 0;
......
......@@ -324,6 +324,10 @@ int main(void)
{
std::cout << "main exception : " << e.what() << std::endl;
}
catch (...)
{
std::cout << "main exception : unknown" << std::endl;
}
std::cout << "Stopping the server" << std::endl;
}
......@@ -276,7 +276,14 @@ int main(void)
if (g_isPresenceStarted)
{
stopPresence();
try
{
stopPresence();
}
catch(...)
{
std::cout << "presence stop fail" << std::endl;
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment