aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorDaulPavid <paul.david@ettus.com>2016-02-09 14:17:43 -0800
committerDaulPavid <paul.david@ettus.com>2016-02-12 13:32:38 -0800
commit35c6d742977fa03e840d70951c0a136720d8a2d0 (patch)
tree1ed57b259eeb883ec135ef96c833a52ef6b3d7f4 /host/examples
parent83c1493e031ddd0b5b80560f4345aaa089446f94 (diff)
downloaduhd-35c6d742977fa03e840d70951c0a136720d8a2d0.tar.gz
uhd-35c6d742977fa03e840d70951c0a136720d8a2d0.tar.bz2
uhd-35c6d742977fa03e840d70951c0a136720d8a2d0.zip
Corrected the UHD behavior in the event of a USB disconnect
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/benchmark_rate.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp
index cc3ef04a4..f8c0342c0 100644
--- a/host/examples/benchmark_rate.cpp
+++ b/host/examples/benchmark_rate.cpp
@@ -80,6 +80,12 @@ void benchmark_rx_rate(
try {
num_rx_samps += rx_stream->recv(buffs, max_samps_per_packet, md)*rx_stream->get_num_channels();
}
+ catch (uhd::io_error &e) {
+ std::cerr << "Caught an IO exception. " << std::endl;
+ std::cerr << e.what() << std::endl;
+
+ return;
+ }
catch (...) {
/* apparently, the boost thread interruption can sometimes result in
throwing exceptions not of type boost::exception, this catch allows