aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/libusb1_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/transport/libusb1_base.cpp')
-rw-r--r--host/lib/transport/libusb1_base.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/transport/libusb1_base.cpp b/host/lib/transport/libusb1_base.cpp
index cfa77d9ca..6d4df7875 100644
--- a/host/lib/transport/libusb1_base.cpp
+++ b/host/lib/transport/libusb1_base.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010-2011 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
//
#include "libusb1_base.hpp"
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/types/dict.hpp>
#include <boost/weak_ptr.hpp>
#include <boost/foreach.hpp>
@@ -93,7 +93,7 @@ public:
//allocate a new list of devices
libusb_device** dev_list;
ssize_t ret = libusb_get_device_list(sess->get_context(), &dev_list);
- if (ret < 0) throw std::runtime_error("cannot enumerate usb devices");
+ if (ret < 0) throw uhd::os_error("cannot enumerate usb devices");
//fill the vector of device references
for (size_t i = 0; i < size_t(ret); i++) _devs.push_back(
@@ -206,9 +206,9 @@ libusb::device_handle::sptr libusb::device_handle::get_cached_handle(device::spt
handles[dev->get()] = new_handle;
return new_handle;
}
- catch(const std::exception &e){
+ catch(const uhd::exception &e){
std::cerr << "USB open failed: see the application notes for your device." << std::endl;
- throw std::runtime_error(e.what());
+ throw;
}
}