mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Catch all exceptions
This commit is contained in:
parent
f24ae66ca2
commit
ca92ff0e44
@ -267,21 +267,24 @@ void write_results(const std::vector<volk_gnsssdr_test_results_t> *results, bool
|
|||||||
// do not overwrite volk_gnsssdr_config when using a regex.
|
// do not overwrite volk_gnsssdr_config when using a regex.
|
||||||
if (!fs::exists(config_path.parent_path()))
|
if (!fs::exists(config_path.parent_path()))
|
||||||
{
|
{
|
||||||
std::cout << "Creating " << config_path.parent_path() << " ..." << std::endl;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
fs::create_directories(config_path.parent_path());
|
std::cout << "Creating " << config_path.parent_path() << " ..." << std::endl;
|
||||||
}
|
try
|
||||||
catch (const fs::filesystem_error &e)
|
{
|
||||||
{
|
fs::create_directories(config_path.parent_path());
|
||||||
std::cerr << "ERROR: Could not create folder " << config_path.parent_path() << std::endl;
|
}
|
||||||
std::cerr << "Reason: " << e.what() << std::endl;
|
catch (const fs::filesystem_error &e)
|
||||||
return;
|
{
|
||||||
|
std::cerr << "ERROR: Could not create folder " << config_path.parent_path() << std::endl;
|
||||||
|
std::cerr << "Reason: " << e.what() << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
// Catch exception when using std::experimental
|
// Catch exception when using std::experimental
|
||||||
std::cerr << "ERROR: Could not create folder " << config_path.parent_path() << std::endl;
|
std::cerr << "ERROR: Could not create folder" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user