summaryrefslogtreecommitdiffstats
path: root/host/lib/device.cpp
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-10-05 11:13:25 -0700
committerNick Foster <nick@nerdnetworks.org>2010-10-05 11:14:45 -0700
commite4d088fa9169eef81473cb7d83bda7c82bc5d243 (patch)
tree0798f4c0863bcb27ff4164f9e2fcc2ccd7bf80d3 /host/lib/device.cpp
parent6dd502737bcf6e59933be01720672db9a496803b (diff)
parentbd3bd0dfbc1a87af5839c9b23450434cfb9c763c (diff)
downloaduhd-e4d088fa9169eef81473cb7d83bda7c82bc5d243.tar.gz
uhd-e4d088fa9169eef81473cb7d83bda7c82bc5d243.tar.bz2
uhd-e4d088fa9169eef81473cb7d83bda7c82bc5d243.zip
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp2p
Conflicts: host/lib/ic_reg_maps/CMakeLists.txt host/lib/usrp/usrp2/io_impl.cpp
Diffstat (limited to 'host/lib/device.cpp')
-rw-r--r--host/lib/device.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/host/lib/device.cpp b/host/lib/device.cpp
index d575ebaab..386588a08 100644
--- a/host/lib/device.cpp
+++ b/host/lib/device.cpp
@@ -26,6 +26,7 @@
#include <boost/functional/hash.hpp>
#include <boost/tuple/tuple.hpp>
#include <stdexcept>
+#include <iostream>
using namespace uhd;
@@ -73,12 +74,17 @@ device_addrs_t device::find(const device_addr_t &hint){
device_addrs_t device_addrs;
BOOST_FOREACH(const dev_fcn_reg_t &fcn, get_dev_fcn_regs()){
- device_addrs_t discovered_addrs = fcn.get<0>()(hint);
- device_addrs.insert(
- device_addrs.begin(),
- discovered_addrs.begin(),
- discovered_addrs.end()
- );
+ try{
+ device_addrs_t discovered_addrs = fcn.get<0>()(hint);
+ device_addrs.insert(
+ device_addrs.begin(),
+ discovered_addrs.begin(),
+ discovered_addrs.end()
+ );
+ }
+ catch(const std::exception &e){
+ std::cerr << "Device discovery error: " << e.what() << std::endl;
+ }
}
return device_addrs;