From 33193a06c1bc197a603f831109533230dc14b4c9 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 2 Jun 2010 15:49:53 -0700 Subject: replaced the assert falses with an invalid code path exception --- host/include/uhd/utils/exception.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'host/include') diff --git a/host/include/uhd/utils/exception.hpp b/host/include/uhd/utils/exception.hpp index 40e81fae0..e74c19b9c 100644 --- a/host/include/uhd/utils/exception.hpp +++ b/host/include/uhd/utils/exception.hpp @@ -35,4 +35,11 @@ " at " + std::string(__FILE__) + ":" + BOOST_STRINGIZE(__LINE__) + "\n" \ ) +/*! + * Throws an invalid code path exception with throw-site information. + * Use this macro in places that code execution is not supposed to go. + */ +#define UHD_THROW_INVALID_CODE_PATH() \ + throw std::runtime_error(UHD_THROW_SITE_INFO("invalid code path")) + #endif /* INCLUDED_UHD_UTILS_EXCEPTION_HPP */ -- cgit v1.2.3