From 4ecc24d09415d7c0a1c3f2383b6adec08105c571 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 23 Aug 2010 16:12:12 -0700 Subject: basic: better errors for invalid antenna selection --- host/lib/usrp/dboard/db_basic_and_lf.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp index f8236d598..0b6e4a75a 100644 --- a/host/lib/usrp/dboard/db_basic_and_lf.cpp +++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp @@ -170,8 +170,8 @@ void basic_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 std::runtime_error("no selectable antennas on this board"); case SUBDEV_PROP_FREQ: return; // it wont do you much good, but you can set it @@ -259,8 +259,8 @@ void basic_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 std::runtime_error("no selectable antennas on this board"); case SUBDEV_PROP_FREQ: return; // it wont do you much good, but you can set it -- cgit v1.2.3