1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-20 00:55:17 +00:00

Avoid throwing exceptions from destructors

Detected by clang-tidy check bugprone-exception-escape
This commit is contained in:
Carles Fernandez
2019-02-10 21:55:51 +01:00
parent 75bd492d96
commit 4b2b205e21
36 changed files with 897 additions and 373 deletions

View File

@@ -40,6 +40,7 @@
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <exception>
#include <iostream>
#include <limits>
#include <utility>
@@ -140,7 +141,14 @@ hybrid_observables_cc::~hybrid_observables_cc()
}
if (d_dump_mat)
{
save_matfile();
try
{
save_matfile();
}
catch (const std::exception &ex)
{
LOG(WARNING) << "Error saving the .mat file: " << ex.what();
}
}
}