aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/vrt_packet_handler.hpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-05-24 14:38:25 -0700
committerJosh Blum <josh@joshknows.com>2010-05-24 14:38:25 -0700
commit71169b8e030d984220eadde83c4b40481f97cf6b (patch)
tree2d488a0408934fbddc0a49c245f26adc1101306c /host/lib/transport/vrt_packet_handler.hpp
parent830e34fe30737432a5bfa4b19cc4bad5b4e425ee (diff)
downloaduhd-71169b8e030d984220eadde83c4b40481f97cf6b.tar.gz
uhd-71169b8e030d984220eadde83c4b40481f97cf6b.tar.bz2
uhd-71169b8e030d984220eadde83c4b40481f97cf6b.zip
Added timeout error message to timed samples example.
Added try catch to recv helper because vrt unpack can throw.
Diffstat (limited to 'host/lib/transport/vrt_packet_handler.hpp')
-rw-r--r--host/lib/transport/vrt_packet_handler.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp
index 2a7f995a1..81420b39e 100644
--- a/host/lib/transport/vrt_packet_handler.hpp
+++ b/host/lib/transport/vrt_packet_handler.hpp
@@ -122,9 +122,14 @@ namespace vrt_packet_handler{
state.fragment_offset_in_samps = 0;
state.managed_buff = zc_iface->get_recv_buff();
recv_cb(state.managed_buff); //callback before vrt unpack
- _recv1_helper(
- state, metadata, tick_rate, vrt_header_offset_words32
- );
+ try{
+ _recv1_helper(
+ state, metadata, tick_rate, vrt_header_offset_words32
+ );
+ }catch(const std::exception &e){
+ std::cerr << "Error (recv): " << e.what() << std::endl;
+ return 0;
+ }
}
//extract the number of samples available to copy