1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-10 20:10:05 +00:00

Catch all exceptions

This commit is contained in:
Carles Fernandez 2024-08-19 12:30:25 +02:00
parent df1314945f
commit 126421f847
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 20 additions and 4 deletions

View File

@ -281,10 +281,19 @@ Adrv9361z7035SignalSourceFPGA::~Adrv9361z7035SignalSourceFPGA()
if (rf_shutdown_) if (rf_shutdown_)
{ {
std::cout << "* AD9361 Disabling RX streaming channels\n"; std::cout << "* AD9361 Disabling RX streaming channels\n";
if (!disable_ad9361_rx_local()) try
{ {
LOG(WARNING) << "Problem shutting down the AD9361 RX channels"; if (!disable_ad9361_rx_local())
{
LOG(WARNING) << "Problem shutting down the AD9361 RX channels";
}
} }
catch (const std::exception &e)
{
LOG(WARNING) << "Problem shutting down the AD9361 RX channels: " << e.what();
std::cerr << "Problem shutting down the AD9361 RX channels: " << e.what() << '\n';
}
if (enable_dds_lo_) if (enable_dds_lo_)
{ {
try try

View File

@ -241,9 +241,16 @@ Fmcomms5SignalSourceFPGA::~Fmcomms5SignalSourceFPGA()
if (rf_shutdown_) if (rf_shutdown_)
{ {
std::cout << "* Disabling RX streaming channels\n"; std::cout << "* Disabling RX streaming channels\n";
if (!disable_ad9361_rx_local()) try
{ {
LOG(WARNING) << "Problem shutting down the AD9361 RX channels"; if (!disable_ad9361_rx_local())
{
LOG(WARNING) << "Problem shutting down the AD9361 RX channels";
}
}
catch (const std::exception &e)
{
std::cerr << "Problem shutting down the AD9361 RX channels: " << e.what() << '\n';
} }
} }