aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-24 16:35:29 -0800
committerJosh Blum <josh@joshknows.com>2011-02-24 16:35:29 -0800
commit4357f5d3c043245b5c086b20742795624af9f432 (patch)
tree7a3cfc9f5b3ffc285ecd611655d741355dcb39b8 /host/lib/usrp/usrp1
parent16f08844d7b6ccbdcfdf17963b88cadb7525ddc6 (diff)
downloaduhd-4357f5d3c043245b5c086b20742795624af9f432.tar.gz
uhd-4357f5d3c043245b5c086b20742795624af9f432.tar.bz2
uhd-4357f5d3c043245b5c086b20742795624af9f432.zip
uhd: replaced instanced of std::exception with the uhd exceptions
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r--host/lib/usrp/usrp1/dboard_iface.cpp2
-rw-r--r--host/lib/usrp/usrp1/mboard_impl.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp
index 67da51ee9..53ccd4d55 100644
--- a/host/lib/usrp/usrp1/dboard_iface.cpp
+++ b/host/lib/usrp/usrp1/dboard_iface.cpp
@@ -329,7 +329,7 @@ static boost::uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit,
else
break;
}
- throw std::invalid_argument("unknown unit type");
+ UHD_THROW_INVALID_CODE_PATH();
}
void usrp1_dboard_iface::write_spi(unit_t unit,
diff --git a/host/lib/usrp/usrp1/mboard_impl.cpp b/host/lib/usrp/usrp1/mboard_impl.cpp
index 9f0512d6d..4e2fad6e5 100644
--- a/host/lib/usrp/usrp1/mboard_impl.cpp
+++ b/host/lib/usrp/usrp1/mboard_impl.cpp
@@ -161,7 +161,7 @@ static boost::uint32_t calc_tx_mux(
//sanity check, only 1 channel per slot
slot_to_chan_count[pair.db_name]++;
if (slot_to_chan_count[pair.db_name] > 1){
- throw std::runtime_error(str(boost::format(
+ throw uhd::value_error(str(boost::format(
"dboard slot %s assigned to multiple channels in subdev spec %s"
) % pair.db_name % subdev_spec.to_string()));
}
@@ -343,7 +343,7 @@ void usrp1_impl::mboard_set(const wax::obj &key, const wax::obj &val)
case MBOARD_PROP_RX_SUBDEV_SPEC:
_rx_subdev_spec = val.as<subdev_spec_t>();
if (_rx_subdev_spec.size() > this->get_num_ddcs()){
- throw std::runtime_error(str(boost::format(
+ throw uhd::value_error(str(boost::format(
"USRP1 suports up to %u RX channels.\n"
"However, this RX subdev spec requires %u channels\n"
) % this->get_num_ddcs() % _rx_subdev_spec.size()));
@@ -356,7 +356,7 @@ void usrp1_impl::mboard_set(const wax::obj &key, const wax::obj &val)
case MBOARD_PROP_TX_SUBDEV_SPEC:
_tx_subdev_spec = val.as<subdev_spec_t>();
if (_tx_subdev_spec.size() > this->get_num_ducs()){
- throw std::runtime_error(str(boost::format(
+ throw uhd::value_error(str(boost::format(
"USRP1 suports up to %u TX channels.\n"
"However, this TX subdev spec requires %u channels\n"
) % this->get_num_ducs() % _tx_subdev_spec.size()));