diff options
| author | Josh Blum <josh@joshknows.com> | 2011-02-24 16:35:29 -0800 |
|---|---|---|
| committer | Josh Blum <josh@joshknows.com> | 2011-02-24 16:35:29 -0800 |
| commit | 4357f5d3c043245b5c086b20742795624af9f432 (patch) | |
| tree | 7a3cfc9f5b3ffc285ecd611655d741355dcb39b8 /host/lib/transport/libusb1_base.cpp | |
| parent | 16f08844d7b6ccbdcfdf17963b88cadb7525ddc6 (diff) | |
| download | uhd-4357f5d3c043245b5c086b20742795624af9f432.tar.gz uhd-4357f5d3c043245b5c086b20742795624af9f432.tar.bz2 uhd-4357f5d3c043245b5c086b20742795624af9f432.zip | |
uhd: replaced instanced of std::exception with the uhd exceptions
Diffstat (limited to 'host/lib/transport/libusb1_base.cpp')
| -rw-r--r-- | host/lib/transport/libusb1_base.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/transport/libusb1_base.cpp b/host/lib/transport/libusb1_base.cpp index aea1a2360..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 @@ -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; } } |
