From 42c7aaa480548716d211c3dcdd2ced1d3c79b510 Mon Sep 17 00:00:00 2001 From: Jason Abele Date: Wed, 21 Sep 2011 10:53:35 -0700 Subject: Make unknown db complain usefully about antenna selection --- host/lib/usrp/dboard/db_unknown.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'host/lib') diff --git a/host/lib/usrp/dboard/db_unknown.cpp b/host/lib/usrp/dboard/db_unknown.cpp index cd7ffe348..3a11f1e5b 100644 --- a/host/lib/usrp/dboard/db_unknown.cpp +++ b/host/lib/usrp/dboard/db_unknown.cpp @@ -176,8 +176,8 @@ void unknown_rx::rx_set(const wax::obj &key_, const wax::obj &val){ return; case SUBDEV_PROP_ANTENNA: - UHD_ASSERT_THROW(val.as() == std::string("")); - return; + if (val.as().empty()) return; + throw uhd::value_error("Unknown Daughterboard: No selectable antenna"); case SUBDEV_PROP_FREQ: return; // it wont do you much good, but you can set it @@ -276,8 +276,8 @@ void unknown_tx::tx_set(const wax::obj &key_, const wax::obj &val){ return; case SUBDEV_PROP_ANTENNA: - UHD_ASSERT_THROW(val.as() == std::string("")); - return; + if (val.as().empty()) return; + throw uhd::value_error("Unknown Daughterboard: No selectable antenna"); case SUBDEV_PROP_FREQ: return; // it wont do you much good, but you can set it -- cgit v1.2.3