aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-24 14:18:52 -0800
committerJosh Blum <josh@joshknows.com>2011-02-24 14:18:52 -0800
commit20a524d1a00497bdffda0292143d92e4d98cfbe9 (patch)
treec06d120b95bf7f8ad99b4a3b1250b62a300784d2
parent4066b1f8fd87b1bca747d5b37a0b28179e188756 (diff)
downloaduhd-20a524d1a00497bdffda0292143d92e4d98cfbe9.tar.gz
uhd-20a524d1a00497bdffda0292143d92e4d98cfbe9.tar.bz2
uhd-20a524d1a00497bdffda0292143d92e4d98cfbe9.zip
uhd: moved exception to top level include
-rw-r--r--host/include/uhd/CMakeLists.txt1
-rw-r--r--host/include/uhd/exception.hpp (renamed from host/include/uhd/utils/exception.hpp)0
-rw-r--r--host/include/uhd/utils/CMakeLists.txt3
-rw-r--r--host/include/uhd/utils/assert.hpp3
-rw-r--r--host/include/uhd/utils/props.hpp9
-rw-r--r--host/lib/CMakeLists.txt1
-rw-r--r--host/lib/convert/convert_impl.cpp2
-rw-r--r--host/lib/exception.cpp (renamed from host/lib/utils/exception.cpp)2
-rw-r--r--host/lib/transport/usb_dummy_impl.cpp2
-rw-r--r--host/lib/types/sensors.cpp2
-rw-r--r--host/lib/usrp/usrp2/codec_ctrl.cpp2
-rw-r--r--host/lib/usrp/usrp2/codec_impl.cpp2
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp2
-rw-r--r--host/lib/utils/CMakeLists.txt1
-rw-r--r--host/tests/error_test.cpp2
15 files changed, 16 insertions, 18 deletions
diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt
index b7a22cf0b..db755511e 100644
--- a/host/include/uhd/CMakeLists.txt
+++ b/host/include/uhd/CMakeLists.txt
@@ -25,6 +25,7 @@ INSTALL(FILES
config.hpp
convert.hpp
device.hpp
+ exception.hpp
version.hpp
wax.hpp
DESTINATION ${INCLUDE_DIR}/uhd
diff --git a/host/include/uhd/utils/exception.hpp b/host/include/uhd/exception.hpp
index 71836e22e..71836e22e 100644
--- a/host/include/uhd/utils/exception.hpp
+++ b/host/include/uhd/exception.hpp
diff --git a/host/include/uhd/utils/CMakeLists.txt b/host/include/uhd/utils/CMakeLists.txt
index b39b6083c..b638431d3 100644
--- a/host/include/uhd/utils/CMakeLists.txt
+++ b/host/include/uhd/utils/CMakeLists.txt
@@ -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
@@ -21,7 +21,6 @@ INSTALL(FILES
assert.ipp
byteswap.hpp
byteswap.ipp
- exception.hpp
gain_group.hpp
images.hpp
pimpl.hpp
diff --git a/host/include/uhd/utils/assert.hpp b/host/include/uhd/utils/assert.hpp
index cd752c1c1..1be4237d6 100644
--- a/host/include/uhd/utils/assert.hpp
+++ b/host/include/uhd/utils/assert.hpp
@@ -19,8 +19,7 @@
#define INCLUDED_UHD_UTILS_ASSERT_HPP
#include <uhd/config.hpp>
-#include <uhd/utils/exception.hpp>
-#include <stdexcept>
+#include <uhd/exception.hpp>
#include <string>
namespace uhd{
diff --git a/host/include/uhd/utils/props.hpp b/host/include/uhd/utils/props.hpp
index fbca03019..81737423a 100644
--- a/host/include/uhd/utils/props.hpp
+++ b/host/include/uhd/utils/props.hpp
@@ -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
@@ -20,8 +20,7 @@
#include <uhd/config.hpp>
#include <uhd/wax.hpp>
-#include <uhd/utils/exception.hpp>
-#include <stdexcept>
+#include <uhd/exception.hpp>
#include <vector>
#include <string>
@@ -68,14 +67,14 @@ namespace uhd{
* Throw-site information will be included with this error.
*/
#define UHD_THROW_PROP_GET_ERROR() \
- throw std::runtime_error(UHD_THROW_SITE_INFO("cannot get this property"))
+ throw uhd::key_error(UHD_THROW_SITE_INFO("cannot get this property"))
/*!
* Throw when setting a not-implemented or read-only property.
* Throw-site information will be included with this error.
*/
#define UHD_THROW_PROP_SET_ERROR() \
- throw std::runtime_error(UHD_THROW_SITE_INFO("cannot set this property"))
+ throw uhd::key_error(UHD_THROW_SITE_INFO("cannot set this property"))
} //namespace uhd
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index c8a5dd51e..c2dbef89b 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -97,6 +97,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_BINARY_DIR}/constants.hpp
${CMAKE_CURRENT_SOURCE_DIR}/device.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/exception.cpp
${CMAKE_CURRENT_SOURCE_DIR}/version.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wax.cpp
)
diff --git a/host/lib/convert/convert_impl.cpp b/host/lib/convert/convert_impl.cpp
index 6a5a1465d..d43cecfec 100644
--- a/host/lib/convert/convert_impl.cpp
+++ b/host/lib/convert/convert_impl.cpp
@@ -17,7 +17,7 @@
#include <uhd/convert.hpp>
#include <uhd/utils/static.hpp>
-#include <uhd/utils/exception.hpp>
+#include <uhd/exception.hpp>
#include <iostream>
using namespace uhd;
diff --git a/host/lib/utils/exception.cpp b/host/lib/exception.cpp
index e66addb0c..2299aa93f 100644
--- a/host/lib/utils/exception.cpp
+++ b/host/lib/exception.cpp
@@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/utils/assert.hpp>
+#include <uhd/exception.hpp>
#include <boost/functional/hash.hpp>
#include <boost/format.hpp>
diff --git a/host/lib/transport/usb_dummy_impl.cpp b/host/lib/transport/usb_dummy_impl.cpp
index 8a9772e7f..419a52279 100644
--- a/host/lib/transport/usb_dummy_impl.cpp
+++ b/host/lib/transport/usb_dummy_impl.cpp
@@ -18,7 +18,7 @@
#include <uhd/transport/usb_device_handle.hpp>
#include <uhd/transport/usb_control.hpp>
#include <uhd/transport/usb_zero_copy.hpp>
-#include <uhd/utils/exception.hpp>
+#include <uhd/exception.hpp>
using namespace uhd;
using namespace uhd::transport;
diff --git a/host/lib/types/sensors.cpp b/host/lib/types/sensors.cpp
index 5f7115d70..401c229a3 100644
--- a/host/lib/types/sensors.cpp
+++ b/host/lib/types/sensors.cpp
@@ -16,7 +16,7 @@
//
#include <uhd/types/sensors.hpp>
-#include <uhd/utils/exception.hpp>
+#include <uhd/exception.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/format.hpp>
diff --git a/host/lib/usrp/usrp2/codec_ctrl.cpp b/host/lib/usrp/usrp2/codec_ctrl.cpp
index 890969b5a..0756c7971 100644
--- a/host/lib/usrp/usrp2/codec_ctrl.cpp
+++ b/host/lib/usrp/usrp2/codec_ctrl.cpp
@@ -22,7 +22,7 @@
#include <boost/cstdint.hpp>
#include <boost/foreach.hpp>
#include <iostream>
-#include <uhd/utils/exception.hpp>
+#include <uhd/exception.hpp>
static const bool codec_ctrl_debug = false;
diff --git a/host/lib/usrp/usrp2/codec_impl.cpp b/host/lib/usrp/usrp2/codec_impl.cpp
index 09bec6db2..2135b155a 100644
--- a/host/lib/usrp/usrp2/codec_impl.cpp
+++ b/host/lib/usrp/usrp2/codec_impl.cpp
@@ -22,7 +22,7 @@
#include <boost/bind.hpp>
#include <boost/assign/list_of.hpp>
#include <uhd/utils/assert.hpp>
-#include <uhd/utils/exception.hpp>
+#include <uhd/exception.hpp>
using namespace uhd;
using namespace uhd::usrp;
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 4407a3011..6426ffd3e 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -17,7 +17,7 @@
#include "usrp2_regs.hpp"
#include "usrp2_iface.hpp"
-#include <uhd/utils/exception.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/assert.hpp>
#include <uhd/types/dict.hpp>
#include <boost/thread.hpp>
diff --git a/host/lib/utils/CMakeLists.txt b/host/lib/utils/CMakeLists.txt
index 082553ff9..c0d99b37e 100644
--- a/host/lib/utils/CMakeLists.txt
+++ b/host/lib/utils/CMakeLists.txt
@@ -110,7 +110,6 @@ SET_SOURCE_FILES_PROPERTIES(
# Append sources
########################################################################
LIBUHD_APPEND_SOURCES(
- ${CMAKE_CURRENT_SOURCE_DIR}/exception.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gain_group.cpp
${CMAKE_CURRENT_SOURCE_DIR}/images.cpp
${CMAKE_CURRENT_SOURCE_DIR}/load_modules.cpp
diff --git a/host/tests/error_test.cpp b/host/tests/error_test.cpp
index 041e6b943..9254fbc85 100644
--- a/host/tests/error_test.cpp
+++ b/host/tests/error_test.cpp
@@ -16,7 +16,7 @@
//
#include <boost/test/unit_test.hpp>
-#include <uhd/utils/exception.hpp>
+#include <uhd/exception.hpp>
#include <uhd/utils/assert.hpp>
#include <vector>
#include <iostream>