[hamradio-commits] [gnss-sdr] 229/303: Catch exceptions when stopping the rtcm server
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Mon Feb 13 22:36:03 UTC 2017
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.
commit 3e18d54a745ea51c262dd6d99602b561fb159064
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Sat Jan 14 15:43:34 2017 +0100
Catch exceptions when stopping the rtcm server
Defect detected by Coverity scan
---
src/algorithms/PVT/libs/rtcm_printer.cc | 13 ++++++++++++-
src/core/system_parameters/rtcm.cc | 13 ++++++++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc
index c20d6ef..be889e4 100644
--- a/src/algorithms/PVT/libs/rtcm_printer.cc
+++ b/src/algorithms/PVT/libs/rtcm_printer.cc
@@ -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())
{
diff --git a/src/core/system_parameters/rtcm.cc b/src/core/system_parameters/rtcm.cc
index 48d21a9..7f1eaa8 100644
--- a/src/core/system_parameters/rtcm.cc
+++ b/src/core/system_parameters/rtcm.cc
@@ -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();
+ }
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list