diff options
author | Josh Blum <josh@joshknows.com> | 2010-04-25 22:05:50 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-04-25 22:05:50 -0700 |
commit | 61ec6711bb4bbae7a8a26cc631eeb88fb3e7d688 (patch) | |
tree | 12cfaf308bcbd779dd5a1254b12a6104088629cc /host/lib/usrp/usrp2/mboard_impl.cpp | |
parent | d1d6c859f0dbae5f044519d589d5ad3fcbb8643e (diff) | |
download | uhd-61ec6711bb4bbae7a8a26cc631eeb88fb3e7d688.tar.gz uhd-61ec6711bb4bbae7a8a26cc631eeb88fb3e7d688.tar.bz2 uhd-61ec6711bb4bbae7a8a26cc631eeb88fb3e7d688.zip |
Work on exceptions.
Added props exception macro to make the set/get prop switch statements easier.
Made use of boost throw exception macro for throw-site information in throw assert.
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/mboard_impl.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index f94806c9f..2c185ec53 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -248,9 +248,7 @@ void usrp2_impl::mboard_get(const wax::obj &key_, wax::obj &val){ val = _clock_config; return; - default: - throw std::runtime_error("Error: trying to get write-only property on usrp2 mboard"); - + default: UHD_THROW_PROP_WRITE_ONLY(); } } @@ -306,8 +304,6 @@ void usrp2_impl::mboard_set(const wax::obj &key, const wax::obj &val){ issue_ddc_stream_cmd(val.as<stream_cmd_t>()); return; - default: - throw std::runtime_error("Error: trying to set read-only property on usrp2 mboard"); - + default: UHD_THROW_PROP_READ_ONLY(); } } |