aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-23 16:12:12 -0700
committerJosh Blum <josh@joshknows.com>2010-08-23 16:12:12 -0700
commit4ecc24d09415d7c0a1c3f2383b6adec08105c571 (patch)
tree600be77ed9e3e3844650d636de4bc5fb43cf05b2
parent8673ee7235bb31f2f51ed2200952f605b0de1955 (diff)
downloaduhd-4ecc24d09415d7c0a1c3f2383b6adec08105c571.tar.gz
uhd-4ecc24d09415d7c0a1c3f2383b6adec08105c571.tar.bz2
uhd-4ecc24d09415d7c0a1c3f2383b6adec08105c571.zip
basic: better errors for invalid antenna selection
-rw-r--r--host/lib/usrp/dboard/db_basic_and_lf.cpp8
1 files changed, 4 insertions, 4 deletions
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>() == std::string(""));
- return;
+ if (val.as<std::string>().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>() == std::string(""));
- return;
+ if (val.as<std::string>().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