aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Dickens <michael.dickens@ettus.com>2015-08-11 15:13:01 -0400
committerMartin Braun <martin.braun@ettus.com>2015-08-11 14:31:25 -0700
commitbb700f81252dc34e6e128054dc1b0a9636041ed1 (patch)
tree29117a1a3ef2e65e46fa93b0321b1c5e44981baa
parent0dbaf46b5cac9179312c0e9c00e9cc1462322d66 (diff)
downloaduhd-bb700f81252dc34e6e128054dc1b0a9636041ed1.tar.gz
uhd-bb700f81252dc34e6e128054dc1b0a9636041ed1.tar.bz2
uhd-bb700f81252dc34e6e128054dc1b0a9636041ed1.zip
b200: fix libusb exceptions to work with that expected by b200 impl exception handling which uses uhd::usb_error (not uhd::runtime_error).
-rw-r--r--host/lib/transport/libusb1_zero_copy.cpp6
1 files 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 <typename buffer_type>
@@ -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;