#include <uhd/config.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <stdexcept>
#include <string>
Go to the source code of this file.
◆ UHD_ASSERT_THROW
      
        
          | #define UHD_ASSERT_THROW | ( |  | code | ) |  | 
      
 
Value:    {                                                               \
        if (not(code))                                              \
    }
#define UHD_THROW_SITE_INFO(what)
Definition exception.hpp:305
Definition exception.hpp:49
Assert the result of the code evaluation. If the code evaluates to false, throw an assertion error. 
- Parameters
- 
  
    | code | the code that resolved to a boolean |  
 
 
 
◆ UHD_THROW_INVALID_CODE_PATH
      
        
          | #define UHD_THROW_INVALID_CODE_PATH | ( |  | ) |  | 
      
 
Value:
Definition exception.hpp:209
 Throws an invalid code path exception with throw-site information. Use this macro in places that code execution is not supposed to go. 
 
 
◆ UHD_THROW_SITE_INFO
      
        
          | #define UHD_THROW_SITE_INFO | ( |  | what | ) |  | 
      
 
Value:    std::string(std::string(what) + 
"\n" + 
"  in " + std::string(
UHD_FUNCTION) + 
"\n" \
                + "  at " + std::string(__FILE__) + ":"                               \
                + BOOST_PP_STRINGIZE(__LINE__) + "\n")
#define UHD_FUNCTION
Definition config.hpp:127
Create a formatted string with throw-site information. Fills in the function name, file name, and line number. 
- Parameters
- 
  
    | what | the std::exception message |  
 
- Returns
- the formatted exception message