diff options
author | Philip Balister <philip@opensdr.com> | 2010-10-21 14:17:47 -0400 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2010-10-21 14:17:47 -0400 |
commit | c31c2d7ef8e4e02854fe51a8a3b8856649464918 (patch) | |
tree | d338268cbdecf21c78a2c77e6e7f95e6f669c4ee /host/lib/device.cpp | |
parent | 3dc06cddaf0a0cf32f76be7077d1427ff4b71a7e (diff) | |
parent | 090b0dd0d38f23cd1d7c4c6a7b0317a6fdfe2b9b (diff) | |
download | uhd-c31c2d7ef8e4e02854fe51a8a3b8856649464918.tar.gz uhd-c31c2d7ef8e4e02854fe51a8a3b8856649464918.tar.bz2 uhd-c31c2d7ef8e4e02854fe51a8a3b8856649464918.zip |
Merge branch 'usrp_e' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'host/lib/device.cpp')
-rw-r--r-- | host/lib/device.cpp | 18 |
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; |