diff options
Diffstat (limited to 'host/lib/usrp/misc_utils.cpp')
-rw-r--r-- | host/lib/usrp/misc_utils.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/usrp/misc_utils.cpp b/host/lib/usrp/misc_utils.cpp index 2bad83b3c..ddcad41cf 100644 --- a/host/lib/usrp/misc_utils.cpp +++ b/host/lib/usrp/misc_utils.cpp @@ -16,7 +16,7 @@ // #include <uhd/usrp/misc_utils.hpp> -#include <uhd/utils/assert.hpp> +#include <uhd/utils/assert_has.hpp> #include <uhd/utils/algorithm.hpp> #include <uhd/utils/gain_group.hpp> #include <uhd/usrp/dboard_eeprom.hpp> @@ -167,7 +167,7 @@ static void verify_xx_subdev_spec( BOOST_FOREACH(subdev_spec_pair_t &pair, subdev_spec){ //empty db name means select dboard automatically if (pair.db_name.empty()){ - if (dboard_names.size() != 1) throw std::runtime_error( + if (dboard_names.size() != 1) throw uhd::value_error( "A daughterboard name must be provided for multi-slot motherboards: " + subdev_spec.to_string() ); pair.db_name = dboard_names.front(); @@ -178,7 +178,7 @@ static void verify_xx_subdev_spec( //empty sd name means select the subdev automatically if (pair.sd_name.empty()){ - if (subdev_names.size() != 1) throw std::runtime_error( + if (subdev_names.size() != 1) throw uhd::value_error( "A subdevice name must be provided for multi-subdev daughterboards: " + subdev_spec.to_string() ); pair.sd_name = subdev_names.front(); @@ -186,7 +186,7 @@ static void verify_xx_subdev_spec( uhd::assert_has(subdev_names, pair.sd_name, xx_type + " subdev name"); } }catch(const std::exception &e){ - throw std::runtime_error(str(boost::format( + throw uhd::value_error(str(boost::format( "Validate %s subdev spec failed: %s\n %s" ) % xx_type % subdev_spec.to_string() % e.what())); } @@ -196,11 +196,11 @@ static void verify_xx_subdev_spec( wax::obj dboard = mboard[named_prop_t(dboard_prop, db_name)]; BOOST_FOREACH(const std::string &sd_name, dboard[DBOARD_PROP_SUBDEV_NAMES].as<prop_names_t>()){ try{ - bool enable = std::has(subdev_spec, subdev_spec_pair_t(db_name, sd_name)); + bool enable = uhd::has(subdev_spec, subdev_spec_pair_t(db_name, sd_name)); dboard[named_prop_t(DBOARD_PROP_SUBDEV, sd_name)][SUBDEV_PROP_ENABLED] = enable; } catch(const std::exception &e){ - throw std::runtime_error(str(boost::format( + throw uhd::runtime_error(str(boost::format( "Cannot set enabled property on subdevice %s:%s\n %s" ) % db_name % sd_name % e.what())); } |