summaryrefslogtreecommitdiffstats
path: root/host/lib/device.cpp
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2010-10-21 14:11:29 -0400
committerPhilip Balister <philip@opensdr.com>2010-10-21 14:11:29 -0400
commit090b0dd0d38f23cd1d7c4c6a7b0317a6fdfe2b9b (patch)
treeec8a6f261a7a722c6842e1d90fa976905b7ead09 /host/lib/device.cpp
parentc830a0d2c491fb61c2b401db94ed0a147bca4a24 (diff)
parentc347ad973f4b51b00f66d7422cd03e8790de9be3 (diff)
downloaduhd-090b0dd0d38f23cd1d7c4c6a7b0317a6fdfe2b9b.tar.gz
uhd-090b0dd0d38f23cd1d7c4c6a7b0317a6fdfe2b9b.tar.bz2
uhd-090b0dd0d38f23cd1d7c4c6a7b0317a6fdfe2b9b.zip
Merge branch 'usrp_e_mmap_b2' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
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;