From bb700f81252dc34e6e128054dc1b0a9636041ed1 Mon Sep 17 00:00:00 2001 From: Michael Dickens Date: Tue, 11 Aug 2015 15:13:01 -0400 Subject: b200: fix libusb exceptions to work with that expected by b200 impl exception handling which uses uhd::usb_error (not uhd::runtime_error). --- host/lib/transport/libusb1_zero_copy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp index 6925e7659..b67b36d0a 100644 --- a/host/lib/transport/libusb1_zero_copy.cpp +++ b/host/lib/transport/libusb1_zero_copy.cpp @@ -139,8 +139,8 @@ public: #endif const int ret = libusb_submit_transfer(_lut); if (ret != LIBUSB_SUCCESS) - throw uhd::runtime_error(str(boost::format("usb %s submit failed: %s") - % _name % libusb_strerror((libusb_error)ret))); + throw uhd::usb_error(ret, str(boost::format( + "usb %s submit failed: %s") % _name % libusb_error_name(ret))); } template @@ -353,7 +353,7 @@ private: _enqueued.push_back(_released.front()); _released.pop_front(); } - catch (uhd::runtime_error& e) + catch (uhd::usb_error& e) { _status = STATUS_ERROR; throw e; -- cgit v1.2.3