1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-31 15:23:04 +00:00

Avoid throwing in the destructor

This commit is contained in:
Carles Fernandez
2018-05-19 22:42:08 +02:00
parent 7d4fe83fb6
commit fc18408f11

View File

@@ -36,6 +36,7 @@
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "GPS_L2C.h" #include "GPS_L2C.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <exception>
#include <iostream> // for cout, endl #include <iostream> // for cout, endl
#ifdef __APPLE__ #ifdef __APPLE__
@@ -122,7 +123,14 @@ Ad9361FpgaSignalSource::~Ad9361FpgaSignalSource()
if (enable_dds_lo_) if (enable_dds_lo_)
{ {
ad9361_disable_lo_local(); try
{
ad9361_disable_lo_local();
}
catch (const std::exception& e)
{
LOW(WARNING) << "Problem closing the Ad9361FpgaSignalSource: " << e.what();
}
} }
// std::cout<<"* AD9361 Destroying context\n"; // std::cout<<"* AD9361 Destroying context\n";