diff options
author | Josh Blum <josh@joshknows.com> | 2010-10-04 10:09:31 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-10-04 10:09:31 -0700 |
commit | 1da774f8abffefb9ed239699551fb116a5effba3 (patch) | |
tree | 77385c5a521e5a2e99dbf969d7770ff4b6bf229f /host/lib/device.cpp | |
parent | 46d2fc423d2fdcf32454621c6f41e555d2496702 (diff) | |
parent | 9cea1342941e74b911ca26cc41c64e340f04c270 (diff) | |
download | uhd-1da774f8abffefb9ed239699551fb116a5effba3.tar.gz uhd-1da774f8abffefb9ed239699551fb116a5effba3.tar.bz2 uhd-1da774f8abffefb9ed239699551fb116a5effba3.zip |
Merge branch 'timeout' into usrp_e_mmap
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; |