1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-25 22:43:14 +00:00

Catch exceptions when stopping the rtcm server

Defect detected by Coverity scan
This commit is contained in:
Carles Fernandez 2017-01-14 15:43:34 +01:00
parent 8eb01075f4
commit 3e18d54a74
2 changed files with 24 additions and 2 deletions

View File

@ -129,7 +129,18 @@ Rtcm_Printer::~Rtcm_Printer()
{
if(rtcm->is_server_running())
{
rtcm->stop_server();
try
{
rtcm->stop_server();
}
catch( boost::exception & e )
{
LOG(WARNING) << "Boost exception: " << boost::diagnostic_information(e);
}
catch(std::exception const& ex)
{
LOG(WARNING) << "STD exception: " << ex.what();
}
}
if (rtcm_file_descriptor.is_open())
{

View File

@ -61,7 +61,18 @@ Rtcm::~Rtcm()
{
if(server_is_running)
{
stop_server();
try
{
stop_server();
}
catch( boost::exception & e )
{
LOG(WARNING) << "Boost exception: " << boost::diagnostic_information(e);
}
catch(std::exception const& ex)
{
LOG(WARNING) << "STD exception: " << ex.what();
}
}
}