From ebb37693a507ac4bbf8b9637d1591385cba457fc Mon Sep 17 00:00:00 2001 From: d0gtail Date: Sat, 1 Dec 2018 17:02:15 +0100 Subject: [PATCH] UHDDevice: log exception information on device open failure Change-Id: Ia84ddcf50cc83f9326b22bfdfb4f259b4e0bc5f1 --- Transceiver52M/device/uhd/UHDDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp index 3db09a8b..765150fb 100644 --- a/Transceiver52M/device/uhd/UHDDevice.cpp +++ b/Transceiver52M/device/uhd/UHDDevice.cpp @@ -635,8 +635,8 @@ int uhd_device::open(const std::string &args, int ref, bool swap_channels) LOGC(DDEV, INFO) << "Using discovered UHD device " << dev_addrs[0].to_string(); try { usrp_dev = uhd::usrp::multi_usrp::make(addr); - } catch(...) { - LOGC(DDEV, ALERT) << "UHD make failed, device " << args; + } catch(uhd::key_error::exception &e) { + LOGC(DDEV, ALERT) << "UHD make failed, device " << args << ", exception:\n" << e.what(); return -1; }