summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-24 14:54:24 -0800
committerJosh Blum <josh@joshknows.com>2011-02-24 14:54:24 -0800
commit16f08844d7b6ccbdcfdf17963b88cadb7525ddc6 (patch)
tree802a4e5558706155d7231ccb8f64b44b1cd67599
parent20a524d1a00497bdffda0292143d92e4d98cfbe9 (diff)
downloaduhd-16f08844d7b6ccbdcfdf17963b88cadb7525ddc6.tar.gz
uhd-16f08844d7b6ccbdcfdf17963b88cadb7525ddc6.tar.bz2
uhd-16f08844d7b6ccbdcfdf17963b88cadb7525ddc6.zip
uhd: renamed the assert header to assert has
only the assert has implementation is in this header uhd assert throw moved to the exception header updated code base includes to match
-rw-r--r--host/include/uhd/exception.hpp9
-rw-r--r--host/include/uhd/utils/CMakeLists.txt4
-rw-r--r--host/include/uhd/utils/assert_has.hpp (renamed from host/include/uhd/utils/assert.hpp)14
-rw-r--r--host/include/uhd/utils/assert_has.ipp (renamed from host/include/uhd/utils/assert.ipp)7
-rw-r--r--host/lib/device.cpp3
-rw-r--r--host/lib/transport/libusb1_base.cpp2
-rw-r--r--host/lib/transport/libusb1_zero_copy.cpp2
-rw-r--r--host/lib/transport/vrt_packet_handler.hpp2
-rw-r--r--host/lib/types/mac_addr.cpp3
-rw-r--r--host/lib/usrp/dboard/db_basic_and_lf.cpp2
-rw-r--r--host/lib/usrp/dboard/db_dbsrx.cpp2
-rw-r--r--host/lib/usrp/dboard/db_dbsrx2.cpp2
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp2
-rw-r--r--host/lib/usrp/dboard/db_tvrx.cpp2
-rw-r--r--host/lib/usrp/dboard/db_unknown.cpp2
-rw-r--r--host/lib/usrp/dboard/db_wbx.cpp2
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp2
-rw-r--r--host/lib/usrp/dboard_eeprom.cpp3
-rw-r--r--host/lib/usrp/dboard_manager.cpp2
-rw-r--r--host/lib/usrp/dsp_utils.cpp2
-rw-r--r--host/lib/usrp/gps_ctrl.cpp5
-rw-r--r--host/lib/usrp/misc_utils.cpp2
-rw-r--r--host/lib/usrp/multi_usrp.cpp2
-rw-r--r--host/lib/usrp/usrp1/clock_ctrl.cpp9
-rw-r--r--host/lib/usrp/usrp1/codec_ctrl.cpp2
-rw-r--r--host/lib/usrp/usrp1/codec_impl.cpp2
-rw-r--r--host/lib/usrp/usrp1/dboard_iface.cpp2
-rw-r--r--host/lib/usrp/usrp1/dboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp1/mboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp1/usrp1_iface.cpp2
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp2
-rw-r--r--host/lib/usrp/usrp2/clock_ctrl.cpp2
-rw-r--r--host/lib/usrp/usrp2/codec_impl.cpp4
-rw-r--r--host/lib/usrp/usrp2/dboard_iface.cpp2
-rw-r--r--host/lib/usrp/usrp2/dboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp1
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp2
-rw-r--r--host/lib/usrp/usrp_e100/clock_ctrl.cpp2
-rw-r--r--host/lib/usrp/usrp_e100/codec_ctrl.cpp4
-rw-r--r--host/lib/usrp/usrp_e100/codec_impl.cpp2
-rw-r--r--host/lib/usrp/usrp_e100/dboard_iface.cpp2
-rw-r--r--host/lib/usrp/usrp_e100/dboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp_e100/fpga_downloader.cpp3
-rw-r--r--host/lib/usrp/usrp_e100/mboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp_e100/usrp_e100_iface.cpp2
-rw-r--r--host/lib/usrp/usrp_e100/usrp_e100_impl.cpp2
-rw-r--r--host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp2
-rw-r--r--host/lib/utils/gain_group.cpp2
-rw-r--r--host/tests/error_test.cpp2
-rw-r--r--host/utils/usrp_burn_db_eeprom.cpp2
51 files changed, 69 insertions, 76 deletions
diff --git a/host/include/uhd/exception.hpp b/host/include/uhd/exception.hpp
index 71836e22e..9acc768ed 100644
--- a/host/include/uhd/exception.hpp
+++ b/host/include/uhd/exception.hpp
@@ -114,6 +114,15 @@ namespace uhd{
#define UHD_THROW_INVALID_CODE_PATH() \
throw uhd::system_error(UHD_THROW_SITE_INFO("invalid code path"))
+ /*!
+ * Assert the result of the code evaluation.
+ * If the code evaluates to false, throw an assertion error.
+ * \param code the code that resolved to a boolean
+ */
+ #define UHD_ASSERT_THROW(code) if (not (code)) \
+ throw uhd::assertion_error(UHD_THROW_SITE_INFO(#code)); \
+ else void(0)
+
} //namespace uhd
#endif /* INCLUDED_UHD_UTILS_EXCEPTION_HPP */
diff --git a/host/include/uhd/utils/CMakeLists.txt b/host/include/uhd/utils/CMakeLists.txt
index b638431d3..4ed7ca460 100644
--- a/host/include/uhd/utils/CMakeLists.txt
+++ b/host/include/uhd/utils/CMakeLists.txt
@@ -17,8 +17,8 @@
INSTALL(FILES
algorithm.hpp
- assert.hpp
- assert.ipp
+ assert_has.hpp
+ assert_has.ipp
byteswap.hpp
byteswap.ipp
gain_group.hpp
diff --git a/host/include/uhd/utils/assert.hpp b/host/include/uhd/utils/assert_has.hpp
index 1be4237d6..eae7652ad 100644
--- a/host/include/uhd/utils/assert.hpp
+++ b/host/include/uhd/utils/assert_has.hpp
@@ -15,20 +15,14 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#ifndef INCLUDED_UHD_UTILS_ASSERT_HPP
-#define INCLUDED_UHD_UTILS_ASSERT_HPP
+#ifndef INCLUDED_UHD_UTILS_ASSERT_HAS_HPP
+#define INCLUDED_UHD_UTILS_ASSERT_HAS_HPP
#include <uhd/config.hpp>
-#include <uhd/exception.hpp>
#include <string>
namespace uhd{
- //! Throw an assert error with throw-site information
- #define UHD_ASSERT_THROW(_x) if (not (_x)) throw uhd::assertion_error( \
- UHD_THROW_SITE_INFO("assertion failed: " + std::string(#_x)) \
- ); else void(0)
-
/*!
* Check that an element is found in a container.
* If not, throw a meaningful assertion error.
@@ -48,6 +42,6 @@ namespace uhd{
}//namespace uhd
-#include <uhd/utils/assert.ipp>
+#include <uhd/utils/assert_has.ipp>
-#endif /* INCLUDED_UHD_UTILS_ASSERT_HPP */
+#endif /* INCLUDED_UHD_UTILS_ASSERT_HAS_HPP */
diff --git a/host/include/uhd/utils/assert.ipp b/host/include/uhd/utils/assert_has.ipp
index 4374fff67..a46d172f4 100644
--- a/host/include/uhd/utils/assert.ipp
+++ b/host/include/uhd/utils/assert_has.ipp
@@ -15,10 +15,11 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#ifndef INCLUDED_UHD_UTILS_ASSERT_IPP
-#define INCLUDED_UHD_UTILS_ASSERT_IPP
+#ifndef INCLUDED_UHD_UTILS_ASSERT_HAS_IPP
+#define INCLUDED_UHD_UTILS_ASSERT_HAS_IPP
#include <uhd/utils/algorithm.hpp>
+#include <uhd/exception.hpp>
#include <boost/format.hpp>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
@@ -49,4 +50,4 @@ namespace uhd{
}//namespace uhd
-#endif /* INCLUDED_UHD_UTILS_ASSERT_IPP */
+#endif /* INCLUDED_UHD_UTILS_ASSERT_HAS_IPP */
diff --git a/host/lib/device.cpp b/host/lib/device.cpp
index 34dd3f854..51c66680a 100644
--- a/host/lib/device.cpp
+++ b/host/lib/device.cpp
@@ -17,7 +17,7 @@
#include <uhd/device.hpp>
#include <uhd/types/dict.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/algorithm.hpp>
#include <boost/foreach.hpp>
@@ -25,7 +25,6 @@
#include <boost/weak_ptr.hpp>
#include <boost/functional/hash.hpp>
#include <boost/tuple/tuple.hpp>
-#include <stdexcept>
#include <iostream>
using namespace uhd;
diff --git a/host/lib/transport/libusb1_base.cpp b/host/lib/transport/libusb1_base.cpp
index cfa77d9ca..aea1a2360 100644
--- a/host/lib/transport/libusb1_base.cpp
+++ b/host/lib/transport/libusb1_base.cpp
@@ -16,7 +16,7 @@
//
#include "libusb1_base.hpp"
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/types/dict.hpp>
#include <boost/weak_ptr.hpp>
#include <boost/foreach.hpp>
diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp
index 87adece45..1b6712871 100644
--- a/host/lib/transport/libusb1_zero_copy.cpp
+++ b/host/lib/transport/libusb1_zero_copy.cpp
@@ -20,7 +20,7 @@
#include <uhd/transport/bounded_buffer.hpp>
#include <uhd/transport/buffer_pool.hpp>
#include <uhd/utils/thread_priority.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <boost/function.hpp>
#include <boost/foreach.hpp>
#include <boost/thread/thread.hpp>
diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp
index 4f8ce7e52..d74b2c13c 100644
--- a/host/lib/transport/vrt_packet_handler.hpp
+++ b/host/lib/transport/vrt_packet_handler.hpp
@@ -20,7 +20,7 @@
#include <uhd/config.hpp>
#include <uhd/device.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/byteswap.hpp>
#include <uhd/types/io_type.hpp>
#include <uhd/types/otw_type.hpp>
diff --git a/host/lib/types/mac_addr.cpp b/host/lib/types/mac_addr.cpp
index cf3c3fa97..a65c8a45d 100644
--- a/host/lib/types/mac_addr.cpp
+++ b/host/lib/types/mac_addr.cpp
@@ -16,12 +16,11 @@
//
#include <uhd/types/mac_addr.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <boost/tokenizer.hpp>
#include <boost/foreach.hpp>
#include <boost/format.hpp>
#include <boost/cstdint.hpp>
-#include <stdexcept>
#include <sstream>
using namespace uhd;
diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp
index b319289db..3de9adbec 100644
--- a/host/lib/usrp/dboard/db_basic_and_lf.cpp
+++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp
@@ -18,7 +18,7 @@
#include <uhd/usrp/subdev_props.hpp>
#include <uhd/types/dict.hpp>
#include <uhd/types/ranges.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/warning.hpp>
#include <uhd/usrp/dboard_base.hpp>
diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp
index 98d9479fc..200822841 100644
--- a/host/lib/usrp/dboard/db_dbsrx.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx.cpp
@@ -21,7 +21,7 @@
#include "max2118_regs.hpp"
#include <uhd/utils/static.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/algorithm.hpp>
#include <uhd/utils/warning.hpp>
#include <uhd/types/ranges.hpp>
diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp
index f4b797995..dd97f76b1 100644
--- a/host/lib/usrp/dboard/db_dbsrx2.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx2.cpp
@@ -19,7 +19,7 @@
#include "max2112_regs.hpp"
#include <uhd/utils/static.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/algorithm.hpp>
#include <uhd/types/ranges.hpp>
#include <uhd/types/sensors.hpp>
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index 3e3cf00f2..5e269fc64 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -37,7 +37,7 @@
#include <uhd/usrp/subdev_props.hpp>
#include <uhd/types/ranges.hpp>
#include <uhd/types/sensors.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/algorithm.hpp>
#include <uhd/utils/warning.hpp>
diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp
index 578999432..4d7cb22f8 100644
--- a/host/lib/usrp/dboard/db_tvrx.cpp
+++ b/host/lib/usrp/dboard/db_tvrx.cpp
@@ -28,7 +28,7 @@
//gain range: [0:1dB:115dB]
#include <uhd/utils/static.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/algorithm.hpp>
#include <uhd/utils/warning.hpp>
#include <uhd/types/ranges.hpp>
diff --git a/host/lib/usrp/dboard/db_unknown.cpp b/host/lib/usrp/dboard/db_unknown.cpp
index f0a4c000e..cef4bee4a 100644
--- a/host/lib/usrp/dboard/db_unknown.cpp
+++ b/host/lib/usrp/dboard/db_unknown.cpp
@@ -17,7 +17,7 @@
#include <uhd/usrp/subdev_props.hpp>
#include <uhd/types/ranges.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/warning.hpp>
#include <uhd/usrp/dboard_base.hpp>
diff --git a/host/lib/usrp/dboard/db_wbx.cpp b/host/lib/usrp/dboard/db_wbx.cpp
index 0bc2d0ca1..2e9a1edc8 100644
--- a/host/lib/usrp/dboard/db_wbx.cpp
+++ b/host/lib/usrp/dboard/db_wbx.cpp
@@ -69,7 +69,7 @@
#include <uhd/usrp/subdev_props.hpp>
#include <uhd/types/ranges.hpp>
#include <uhd/types/sensors.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/algorithm.hpp>
#include <uhd/utils/warning.hpp>
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index f4f74eb86..4eafd6fda 100644
--- a/host/lib/usrp/dboard/db_xcvr2450.cpp
+++ b/host/lib/usrp/dboard/db_xcvr2450.cpp
@@ -49,7 +49,7 @@
#include "max2829_regs.hpp"
#include <uhd/utils/static.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/algorithm.hpp>
#include <uhd/utils/warning.hpp>
#include <uhd/types/ranges.hpp>
diff --git a/host/lib/usrp/dboard_eeprom.cpp b/host/lib/usrp/dboard_eeprom.cpp
index 5e8e27272..c1e44fb74 100644
--- a/host/lib/usrp/dboard_eeprom.cpp
+++ b/host/lib/usrp/dboard_eeprom.cpp
@@ -16,7 +16,8 @@
//
#include <uhd/usrp/dboard_eeprom.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
+#include <boost/foreach.hpp>
#include <boost/format.hpp>
#include <algorithm>
#include <iostream>
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index 75594e670..f9d43901d 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -20,7 +20,7 @@
#include <uhd/usrp/subdev_props.hpp>
#include <uhd/utils/warning.hpp>
#include <uhd/utils/static.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/types/dict.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/format.hpp>
diff --git a/host/lib/usrp/dsp_utils.cpp b/host/lib/usrp/dsp_utils.cpp
index 576c4639f..6332f7991 100644
--- a/host/lib/usrp/dsp_utils.cpp
+++ b/host/lib/usrp/dsp_utils.cpp
@@ -17,7 +17,7 @@
#include <uhd/usrp/dsp_utils.hpp>
#include <uhd/types/dict.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/math/special_functions/round.hpp>
diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp
index b1062fa39..e868568a0 100644
--- a/host/lib/usrp/gps_ctrl.cpp
+++ b/host/lib/usrp/gps_ctrl.cpp
@@ -16,11 +16,10 @@
//
#include <uhd/usrp/gps_ctrl.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <boost/cstdint.hpp>
-#include <string>
#include <boost/date_time/posix_time/posix_time.hpp>
-#include <boost/thread.hpp>
+#include <boost/thread/thread.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/tokenizer.hpp>
diff --git a/host/lib/usrp/misc_utils.cpp b/host/lib/usrp/misc_utils.cpp
index 2bad83b3c..9074c3fe6 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>
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 23049d569..3329ea4fe 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -18,7 +18,7 @@
#include "wrapper_utils.hpp"
#include <uhd/usrp/multi_usrp.hpp>
#include <uhd/usrp/tune_helper.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/warning.hpp>
#include <uhd/utils/gain_group.hpp>
#include <uhd/usrp/subdev_props.hpp>
diff --git a/host/lib/usrp/usrp1/clock_ctrl.cpp b/host/lib/usrp/usrp1/clock_ctrl.cpp
index 156f2b0c4..df5353b54 100644
--- a/host/lib/usrp/usrp1/clock_ctrl.cpp
+++ b/host/lib/usrp/usrp1/clock_ctrl.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010-2011 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -16,13 +16,6 @@
//
#include "clock_ctrl.hpp"
-#include "fpga_regs_standard.h"
-#include <uhd/utils/assert.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/assign/list_of.hpp>
-#include <boost/foreach.hpp>
-#include <utility>
-#include <iostream>
using namespace uhd;
diff --git a/host/lib/usrp/usrp1/codec_ctrl.cpp b/host/lib/usrp/usrp1/codec_ctrl.cpp
index f3816b377..56c3cee13 100644
--- a/host/lib/usrp/usrp1/codec_ctrl.cpp
+++ b/host/lib/usrp/usrp1/codec_ctrl.cpp
@@ -20,7 +20,7 @@
#include "clock_ctrl.hpp"
#include "ad9862_regs.hpp"
#include <uhd/types/dict.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/algorithm.hpp>
#include <uhd/utils/byteswap.hpp>
#include <boost/cstdint.hpp>
diff --git a/host/lib/usrp/usrp1/codec_impl.cpp b/host/lib/usrp/usrp1/codec_impl.cpp
index 14ecd2d2e..7e4032131 100644
--- a/host/lib/usrp/usrp1/codec_impl.cpp
+++ b/host/lib/usrp/usrp1/codec_impl.cpp
@@ -16,7 +16,7 @@
//
#include "usrp1_impl.hpp"
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/usrp/codec_props.hpp>
#include <boost/bind.hpp>
#include <boost/foreach.hpp>
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp
index eec4a52db..67da51ee9 100644
--- a/host/lib/usrp/usrp1/dboard_iface.cpp
+++ b/host/lib/usrp/usrp1/dboard_iface.cpp
@@ -24,7 +24,7 @@
#include "codec_ctrl.hpp"
#include <uhd/usrp/dboard_iface.hpp>
#include <uhd/types/dict.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <boost/assign/list_of.hpp>
#include <iostream>
diff --git a/host/lib/usrp/usrp1/dboard_impl.cpp b/host/lib/usrp/usrp1/dboard_impl.cpp
index 2130960fb..02906fc45 100644
--- a/host/lib/usrp/usrp1/dboard_impl.cpp
+++ b/host/lib/usrp/usrp1/dboard_impl.cpp
@@ -19,7 +19,7 @@
#include "usrp_i2c_addr.h"
#include <uhd/usrp/dsp_utils.hpp>
#include <uhd/usrp/misc_utils.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/usrp/dboard_props.hpp>
#include <uhd/usrp/subdev_props.hpp>
#include <boost/bind.hpp>
diff --git a/host/lib/usrp/usrp1/mboard_impl.cpp b/host/lib/usrp/usrp1/mboard_impl.cpp
index 26d3e41d4..9f0512d6d 100644
--- a/host/lib/usrp/usrp1/mboard_impl.cpp
+++ b/host/lib/usrp/usrp1/mboard_impl.cpp
@@ -25,7 +25,7 @@
#include <uhd/usrp/dboard_props.hpp>
#include <uhd/usrp/subdev_props.hpp>
#include <uhd/utils/warning.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/images.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/foreach.hpp>
diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp
index 63fcd5777..947847044 100644
--- a/host/lib/usrp/usrp1/usrp1_iface.cpp
+++ b/host/lib/usrp/usrp1/usrp1_iface.cpp
@@ -17,7 +17,7 @@
#include "usrp1_iface.hpp"
#include "usrp_commands.h"
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/byteswap.hpp>
#include <boost/format.hpp>
#include <stdexcept>
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index c395db0b9..1ec332a61 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -23,7 +23,7 @@
#include <uhd/usrp/device_props.hpp>
#include <uhd/usrp/mboard_props.hpp>
#include <uhd/utils/warning.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/images.hpp>
#include <boost/format.hpp>
diff --git a/host/lib/usrp/usrp2/clock_ctrl.cpp b/host/lib/usrp/usrp2/clock_ctrl.cpp
index 27ccefb2b..aaafbae53 100644
--- a/host/lib/usrp/usrp2/clock_ctrl.cpp
+++ b/host/lib/usrp/usrp2/clock_ctrl.cpp
@@ -19,7 +19,7 @@
#include "ad9510_regs.hpp"
#include "usrp2_regs.hpp" //spi slave constants
#include "usrp2_clk_regs.hpp"
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <boost/cstdint.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/math/special_functions/round.hpp>
diff --git a/host/lib/usrp/usrp2/codec_impl.cpp b/host/lib/usrp/usrp2/codec_impl.cpp
index 2135b155a..50320773f 100644
--- a/host/lib/usrp/usrp2/codec_impl.cpp
+++ b/host/lib/usrp/usrp2/codec_impl.cpp
@@ -16,13 +16,13 @@
//
#include "usrp2_impl.hpp"
+#include <uhd/utils/assert_has.hpp>
+#include <uhd/exception.hpp>
#include <uhd/usrp/codec_props.hpp>
#include <uhd/types/dict.hpp>
#include <uhd/types/ranges.hpp>
#include <boost/bind.hpp>
#include <boost/assign/list_of.hpp>
-#include <uhd/utils/assert.hpp>
-#include <uhd/exception.hpp>
using namespace uhd;
using namespace uhd::usrp;
diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp
index c539b0058..8b2df61d6 100644
--- a/host/lib/usrp/usrp2/dboard_iface.cpp
+++ b/host/lib/usrp/usrp2/dboard_iface.cpp
@@ -20,7 +20,7 @@
#include "usrp2_regs.hpp" //wishbone address constants
#include <uhd/usrp/dboard_iface.hpp>
#include <uhd/types/dict.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/algorithm.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/asio.hpp> //htonl and ntohl
diff --git a/host/lib/usrp/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp
index b668d435b..e21fda074 100644
--- a/host/lib/usrp/usrp2/dboard_impl.cpp
+++ b/host/lib/usrp/usrp2/dboard_impl.cpp
@@ -21,7 +21,7 @@
#include <uhd/usrp/dsp_utils.hpp>
#include <uhd/usrp/subdev_props.hpp>
#include <uhd/usrp/dboard_props.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <boost/format.hpp>
#include <boost/bind.hpp>
#include <boost/asio.hpp> //htonl and ntohl
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 34a2b7c69..f59b7b7dd 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -22,7 +22,7 @@
#include <uhd/usrp/dsp_utils.hpp>
#include <uhd/usrp/mboard_props.hpp>
#include <uhd/utils/byteswap.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/algorithm.hpp>
#include <boost/bind.hpp>
#include <iostream>
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 6426ffd3e..462ebab16 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -18,7 +18,6 @@
#include "usrp2_regs.hpp"
#include "usrp2_iface.hpp"
#include <uhd/exception.hpp>
-#include <uhd/utils/assert.hpp>
#include <uhd/types/dict.hpp>
#include <boost/thread.hpp>
#include <boost/foreach.hpp>
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 95031d211..afd73401f 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -19,7 +19,7 @@
#include <uhd/transport/if_addrs.hpp>
#include <uhd/transport/udp_zero_copy.hpp>
#include <uhd/usrp/device_props.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/warning.hpp>
#include <uhd/utils/byteswap.hpp>
diff --git a/host/lib/usrp/usrp_e100/clock_ctrl.cpp b/host/lib/usrp/usrp_e100/clock_ctrl.cpp
index e29fe18ce..6128894cc 100644
--- a/host/lib/usrp/usrp_e100/clock_ctrl.cpp
+++ b/host/lib/usrp/usrp_e100/clock_ctrl.cpp
@@ -17,7 +17,7 @@
#include "clock_ctrl.hpp"
#include "ad9522_regs.hpp"
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <boost/cstdint.hpp>
#include "usrp_e100_regs.hpp" //spi slave constants
#include <boost/assign/list_of.hpp>
diff --git a/host/lib/usrp/usrp_e100/codec_ctrl.cpp b/host/lib/usrp/usrp_e100/codec_ctrl.cpp
index b33c8ae65..b5671072c 100644
--- a/host/lib/usrp/usrp_e100/codec_ctrl.cpp
+++ b/host/lib/usrp/usrp_e100/codec_ctrl.cpp
@@ -18,7 +18,7 @@
#include "codec_ctrl.hpp"
#include "ad9862_regs.hpp"
#include <uhd/types/dict.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/algorithm.hpp>
#include <boost/cstdint.hpp>
#include <boost/tuple/tuple.hpp>
@@ -227,7 +227,7 @@ double usrp_e100_codec_ctrl_impl::read_aux_adc(aux_adc_t which){
case AUX_ADC_B1: return aux_adc_to_volts(_ad9862_regs.aux_adc_b1_9_2, _ad9862_regs.aux_adc_b1_1_0);
case AUX_ADC_B2: return aux_adc_to_volts(_ad9862_regs.aux_adc_b2_9_2, _ad9862_regs.aux_adc_b2_1_0);
}
- UHD_ASSERT_THROW(false);
+ UHD_THROW_INVALID_CODE_PATH();
}
/***********************************************************************
diff --git a/host/lib/usrp/usrp_e100/codec_impl.cpp b/host/lib/usrp/usrp_e100/codec_impl.cpp
index 0d91fb42c..ae198aaa5 100644
--- a/host/lib/usrp/usrp_e100/codec_impl.cpp
+++ b/host/lib/usrp/usrp_e100/codec_impl.cpp
@@ -16,7 +16,7 @@
//
#include "usrp_e100_impl.hpp"
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/usrp/codec_props.hpp>
#include <boost/bind.hpp>
diff --git a/host/lib/usrp/usrp_e100/dboard_iface.cpp b/host/lib/usrp/usrp_e100/dboard_iface.cpp
index e4c3856c9..ee6ca3933 100644
--- a/host/lib/usrp/usrp_e100/dboard_iface.cpp
+++ b/host/lib/usrp/usrp_e100/dboard_iface.cpp
@@ -21,7 +21,7 @@
#include "codec_ctrl.hpp"
#include <uhd/usrp/dboard_iface.hpp>
#include <uhd/types/dict.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <boost/assign/list_of.hpp>
#include <linux/usrp_e.h> //i2c and spi constants
diff --git a/host/lib/usrp/usrp_e100/dboard_impl.cpp b/host/lib/usrp/usrp_e100/dboard_impl.cpp
index b533c2657..0b89fed9f 100644
--- a/host/lib/usrp/usrp_e100/dboard_impl.cpp
+++ b/host/lib/usrp/usrp_e100/dboard_impl.cpp
@@ -17,7 +17,7 @@
#include "usrp_e100_impl.hpp"
#include "usrp_e100_regs.hpp"
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/usrp/dboard_props.hpp>
#include <uhd/usrp/subdev_props.hpp>
#include <uhd/usrp/misc_utils.hpp>
diff --git a/host/lib/usrp/usrp_e100/fpga_downloader.cpp b/host/lib/usrp/usrp_e100/fpga_downloader.cpp
index c0013fcbd..9836cbc02 100644
--- a/host/lib/usrp/usrp_e100/fpga_downloader.cpp
+++ b/host/lib/usrp/usrp_e100/fpga_downloader.cpp
@@ -16,14 +16,13 @@
//
#include <uhd/config.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <cstdlib>
-#include <stdexcept>
#include <fcntl.h>
#include <sys/types.h>
diff --git a/host/lib/usrp/usrp_e100/mboard_impl.cpp b/host/lib/usrp/usrp_e100/mboard_impl.cpp
index a4db53715..07476bd6c 100644
--- a/host/lib/usrp/usrp_e100/mboard_impl.cpp
+++ b/host/lib/usrp/usrp_e100/mboard_impl.cpp
@@ -19,7 +19,7 @@
#include "usrp_e100_regs.hpp"
#include <uhd/usrp/dsp_utils.hpp>
#include <uhd/usrp/misc_utils.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/usrp/mboard_props.hpp>
#include <boost/bind.hpp>
#include <iostream>
diff --git a/host/lib/usrp/usrp_e100/usrp_e100_iface.cpp b/host/lib/usrp/usrp_e100/usrp_e100_iface.cpp
index ad36dd97a..687008df8 100644
--- a/host/lib/usrp/usrp_e100/usrp_e100_iface.cpp
+++ b/host/lib/usrp/usrp_e100/usrp_e100_iface.cpp
@@ -17,7 +17,7 @@
#include "usrp_e100_iface.hpp"
#include "usrp_e100_regs.hpp"
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <sys/ioctl.h> //ioctl
#include <fcntl.h> //open, close
#include <linux/usrp_e.h> //ioctl structures and constants
diff --git a/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp b/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp
index 40ea56466..d4404fc88 100644
--- a/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp
+++ b/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp
@@ -19,7 +19,7 @@
#include "usrp_e100_regs.hpp"
#include <uhd/usrp/device_props.hpp>
#include <uhd/usrp/mboard_props.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/images.hpp>
#include <uhd/utils/warning.hpp>
diff --git a/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp b/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp
index c155d426a..f4274dc5a 100644
--- a/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp
+++ b/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp
@@ -17,7 +17,7 @@
#include "usrp_e100_iface.hpp"
#include <uhd/transport/zero_copy.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <linux/usrp_e.h>
#include <sys/mman.h> //mmap
#include <unistd.h> //getpagesize
diff --git a/host/lib/utils/gain_group.cpp b/host/lib/utils/gain_group.cpp
index 07aa21115..101620a33 100644
--- a/host/lib/utils/gain_group.cpp
+++ b/host/lib/utils/gain_group.cpp
@@ -18,7 +18,7 @@
#include <uhd/utils/gain_group.hpp>
#include <uhd/types/dict.hpp>
#include <uhd/utils/algorithm.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <boost/foreach.hpp>
#include <boost/bind.hpp>
#include <algorithm>
diff --git a/host/tests/error_test.cpp b/host/tests/error_test.cpp
index 9254fbc85..3499c25da 100644
--- a/host/tests/error_test.cpp
+++ b/host/tests/error_test.cpp
@@ -17,7 +17,7 @@
#include <boost/test/unit_test.hpp>
#include <uhd/exception.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <vector>
#include <iostream>
diff --git a/host/utils/usrp_burn_db_eeprom.cpp b/host/utils/usrp_burn_db_eeprom.cpp
index ac5608f22..617417e09 100644
--- a/host/utils/usrp_burn_db_eeprom.cpp
+++ b/host/utils/usrp_burn_db_eeprom.cpp
@@ -19,7 +19,7 @@
#include <uhd/utils/safe_main.hpp>
#include <uhd/device.hpp>
#include <uhd/types/dict.hpp>
-#include <uhd/utils/assert.hpp>
+#include <uhd/utils/assert_has.hpp>
#include <uhd/usrp/dboard_eeprom.hpp>
#include <uhd/usrp/device_props.hpp>
#include <uhd/usrp/mboard_props.hpp>