aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/utils/assert.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/host/include/uhd/utils/assert.hpp b/host/include/uhd/utils/assert.hpp
index 6aca64f8c..577050aff 100644
--- a/host/include/uhd/utils/assert.hpp
+++ b/host/include/uhd/utils/assert.hpp
@@ -29,7 +29,14 @@
#include <string>
#ifndef BOOST_THROW_EXCEPTION
-#define BOOST_THROW_EXCEPTION(x) throw std::runtime_error("")
+ #include <boost/exception/exception.hpp>
+ #include <boost/current_function.hpp>
+ #define BOOST_THROW_EXCEPTION(x)\
+ ::boost::throw_exception( ::boost::enable_error_info(x) <<\
+ ::boost::throw_function(BOOST_CURRENT_FUNCTION) <<\
+ ::boost::throw_file(__FILE__) <<\
+ ::boost::throw_line((int)__LINE__) )
+
#endif
namespace uhd{