1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-05-01 15:04:12 +00:00

Avoid throwing in the destructor

This commit is contained in:
Carles Fernandez 2018-05-19 20:34:50 +02:00
parent a05952c966
commit b4cc22abc2
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -1,6 +1,6 @@
/*! /*!
* \filei fmcomms2_signal_source.cc * \file fmcomms2_signal_source.cc
* \brief signal source for sdr hardware from analog devices based on * \brief Signal source for SDR hardware from Analog Devices based on
* fmcomms2 evaluation board. * fmcomms2 evaluation board.
* \author Rodrigo Muñoz, 2017, rmunozl(at)inacap.cl * \author Rodrigo Muñoz, 2017, rmunozl(at)inacap.cl
* *
@ -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> #include <iostream>
@ -178,9 +179,16 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration
Fmcomms2SignalSource::~Fmcomms2SignalSource() Fmcomms2SignalSource::~Fmcomms2SignalSource()
{ {
if (enable_dds_lo_ == true) if (enable_dds_lo_ == true)
{
try
{ {
ad9361_disable_lo_remote(uri_); ad9361_disable_lo_remote(uri_);
} }
catch (const std::exception& e)
{
LOG(WARNING) << "Exception thrown in Fmcomms2SignalSource destructor: " << e.what();
}
}
} }