1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-07 10:43:58 +00:00

Fix const correctness when catching exceptions

See https://stackoverflow.com/questions/7581654/about-catching-exception-good-practices
Unneeded includes unistd.h removed
Close dump files in destructor
This commit is contained in:
Carles Fernandez
2017-08-14 13:59:00 +02:00
parent 174bba55fc
commit 85cc7802be
21 changed files with 81 additions and 66 deletions

View File

@@ -79,12 +79,12 @@ OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration,
{
if (!osmosdr_args_.empty())
{
std::cout << "OsmoSdr arguments: " << osmosdr_args_ << std::endl;
LOG(INFO) << "OsmoSdr arguments: " << osmosdr_args_;
std::cout << "OsmoSdr arguments: " << osmosdr_args_ << std::endl;
LOG(INFO) << "OsmoSdr arguments: " << osmosdr_args_;
}
osmosdr_source_ = osmosdr::source::make(osmosdr_args_);
}
catch( boost::exception & e )
catch( const boost::exception & e )
{
DLOG(FATAL) << "Boost exception: " << boost::diagnostic_information(e);
}

View File

@@ -84,7 +84,7 @@ RtlTcpSignalSource::RtlTcpSignalSource(ConfigurationInterface* configuration,
LOG (INFO) << "Connecting to " << address_ << ":" << port_;
signal_source_ = rtl_tcp_make_signal_source_c (address_, port_, flip_iq_);
}
catch( boost::exception & e )
catch( const boost::exception & e )
{
DLOG(FATAL) << "Boost exception: " << boost::diagnostic_information(e);
}