diff options
author | Michael West <michael.west@ettus.com> | 2013-11-19 15:21:52 -0800 |
---|---|---|
committer | Michael West <michael.west@ettus.com> | 2013-11-19 15:21:52 -0800 |
commit | a764d4b3bfd2165b34fb1bf46bc739587e479600 (patch) | |
tree | 7283a8584c420473558c21e5ab4c7d32f24a0d86 /host | |
parent | 3db58e03cd525c973e47351656eed63015131136 (diff) | |
download | uhd-a764d4b3bfd2165b34fb1bf46bc739587e479600.tar.gz uhd-a764d4b3bfd2165b34fb1bf46bc739587e479600.tar.bz2 uhd-a764d4b3bfd2165b34fb1bf46bc739587e479600.zip |
More fixes for Win32 compatibility.
Diffstat (limited to 'host')
-rw-r--r-- | host/utils/b2xx_fx3_utils.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/host/utils/b2xx_fx3_utils.cpp b/host/utils/b2xx_fx3_utils.cpp index f958d1c9f..01e1ea793 100644 --- a/host/utils/b2xx_fx3_utils.cpp +++ b/host/utils/b2xx_fx3_utils.cpp @@ -153,11 +153,20 @@ b200_iface::sptr make_b200_iface(const uhd::transport::usb_device_handle::sptr & { b200_iface::sptr b200; - uhd::transport::usb_control::sptr usb_ctrl = uhd::transport::usb_control::make(handle, 0); - b200 = b200_iface::make(usb_ctrl); + try { + uhd::transport::usb_control::sptr usb_ctrl = uhd::transport::usb_control::make(handle, 0); + b200 = b200_iface::make(usb_ctrl); - if (!b200) - std::cerr << "Cannot create device interface" << std::endl; + if (!b200) + std::cerr << "Cannot create device interface" << std::endl; + } + catch(const std::exception &e) { + std::cerr << "Failed to communicate with the device!" << std::endl; + #ifdef UHD_PLATFORM_WIN32 + std::cerr << "The necessary drivers are not installed. Read the UHD Transport Application Notes for details." << std::endl; + #endif /* UHD_PLATFORM_WIN32 */ + b200.reset(); + } return b200; } |