1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-08-08 23:13:54 +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
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

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