diff options
author | Josh Blum <josh@joshknows.com> | 2010-06-02 15:49:53 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-06-02 15:49:53 -0700 |
commit | 33193a06c1bc197a603f831109533230dc14b4c9 (patch) | |
tree | 9d24eef219b48f9f661a3642efcc36050b1c0f9a /host/include | |
parent | a4494bc2c985919aee7119ed401c72f41cde206e (diff) | |
download | uhd-33193a06c1bc197a603f831109533230dc14b4c9.tar.gz uhd-33193a06c1bc197a603f831109533230dc14b4c9.tar.bz2 uhd-33193a06c1bc197a603f831109533230dc14b4c9.zip |
replaced the assert falses with an invalid code path exception
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/utils/exception.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 */ |