From dcf9c8c7749d9cf119fbae9ed33e50588fa77d31 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 24 Sep 2021 09:20:49 +0200 Subject: [PATCH] Be more explicit in the terminal if an instantiation fails --- src/core/receiver/gnss_block_factory.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/receiver/gnss_block_factory.cc b/src/core/receiver/gnss_block_factory.cc index 789bfa427..1004fc51c 100644 --- a/src/core/receiver/gnss_block_factory.cc +++ b/src/core/receiver/gnss_block_factory.cc @@ -1273,8 +1273,10 @@ std::unique_ptr GNSSBlockFactory::GetBlock( } catch (const std::exception& e) { - std::cout << "Configuration error. GNSS-SDR program ended.\n"; - LOG(INFO) << "Exception raised while instantiating a block: " << e.what(); + LOG(INFO) << "Exception raised while instantiating the block: " << e.what(); + std::cout << "Configuration error in " << role << " block, implementation " << (implementation == "Wrong"s ? "not defined."s : implementation) << ". The error was:\n" + << e.what() << '\n'; + std::cout << "GNSS-SDR program ended.\n"; exit(1); } return block;