aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/device.cpp
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2010-11-04 08:02:10 -0400
committerPhilip Balister <philip@opensdr.com>2010-11-04 08:02:10 -0400
commit40080e474268291c915f8d68e99506e8ae2a3f75 (patch)
tree99581ec02c77b08a11f38af901dc9db35adcbe3a /host/lib/device.cpp
parent7f8d7b0e2fef1b2d5bb9c8047380dcf958c0c49c (diff)
parent16351339eb6962288844cefefbdb3f6eece8aca1 (diff)
downloaduhd-40080e474268291c915f8d68e99506e8ae2a3f75.tar.gz
uhd-40080e474268291c915f8d68e99506e8ae2a3f75.tar.bz2
uhd-40080e474268291c915f8d68e99506e8ae2a3f75.zip
Merge remote branch 'origin/usrp_e_next' into usrp_e_next
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;