7 #ifndef INCLUDED_UHD_EXCEPTION_HPP 8 #define INCLUDED_UHD_EXCEPTION_HPP 11 #include <boost/current_function.hpp> 36 virtual unsigned code(
void)
const = 0;
37 virtual exception *dynamic_clone(
void)
const = 0;
38 virtual void dynamic_throw(
void)
const = 0;
43 virtual unsigned code(
void)
const;
44 virtual assertion_error *dynamic_clone(
void)
const;
45 virtual void dynamic_throw(
void)
const;
50 virtual unsigned code(
void)
const;
51 virtual lookup_error *dynamic_clone(
void)
const;
52 virtual void dynamic_throw(
void)
const;
57 virtual unsigned code(
void)
const;
58 virtual index_error *dynamic_clone(
void)
const;
59 virtual void dynamic_throw(
void)
const;
64 virtual unsigned code(
void)
const;
65 virtual key_error *dynamic_clone(
void)
const;
66 virtual void dynamic_throw(
void)
const;
71 virtual unsigned code(
void)
const;
72 virtual type_error *dynamic_clone(
void)
const;
73 virtual void dynamic_throw(
void)
const;
78 virtual unsigned code(
void)
const;
79 virtual value_error *dynamic_clone(
void)
const;
80 virtual void dynamic_throw(
void)
const;
85 virtual unsigned code(
void)
const;
86 virtual narrowing_error *dynamic_clone(
void)
const;
87 virtual void dynamic_throw(
void)
const;
92 virtual unsigned code(
void)
const;
93 virtual runtime_error *dynamic_clone(
void)
const;
94 virtual void dynamic_throw(
void)
const;
99 usb_error(
int code,
const std::string &what);
100 virtual unsigned code(
void)
const {
return _code; };
101 virtual usb_error *dynamic_clone(
void)
const;
102 virtual void dynamic_throw(
void)
const;
107 virtual unsigned code(
void)
const;
108 virtual not_implemented_error *dynamic_clone(
void)
const;
109 virtual void dynamic_throw(
void)
const;
114 virtual unsigned code(
void)
const;
115 virtual environment_error *dynamic_clone(
void)
const;
116 virtual void dynamic_throw(
void)
const;
121 virtual unsigned code(
void)
const;
122 virtual io_error *dynamic_clone(
void)
const;
123 virtual void dynamic_throw(
void)
const;
128 virtual unsigned code(
void)
const;
129 virtual os_error *dynamic_clone(
void)
const;
130 virtual void dynamic_throw(
void)
const;
135 virtual unsigned code(
void)
const;
136 virtual system_error *dynamic_clone(
void)
const;
137 virtual void dynamic_throw(
void)
const;
142 virtual unsigned code(
void)
const;
143 virtual syntax_error *dynamic_clone(
void)
const;
144 virtual void dynamic_throw(
void)
const;
153 #define UHD_THROW_SITE_INFO(what) std::string( \ 154 std::string(what) + "\n" + \ 155 " in " + std::string(BOOST_CURRENT_FUNCTION) + "\n" + \ 156 " at " + std::string(__FILE__) + ":" + BOOST_STRINGIZE(__LINE__) + "\n" \ 163 #define UHD_THROW_INVALID_CODE_PATH() \ 164 throw uhd::system_error(UHD_THROW_SITE_INFO("invalid code path")) 171 #define UHD_ASSERT_THROW(code) {if (not (code)) \ 172 throw uhd::assertion_error(UHD_THROW_SITE_INFO(#code)); \ Definition: exception.hpp:34
Definition: exception.hpp:112
Definition: exception.hpp:126
Definition: exception.hpp:105
Definition: exception.hpp:48
Definition: exception.hpp:62
Definition: exception.hpp:90
Definition: exception.hpp:133
int _code
Definition: exception.hpp:98
Definition: exception.hpp:76
Definition: exception.hpp:83
Definition: build_info.hpp:14
Definition: exception.hpp:119
Definition: exception.hpp:55
Definition: exception.hpp:140
Definition: exception.hpp:41
#define UHD_API
Definition: config.h:62
virtual unsigned code(void) const
Definition: exception.hpp:100
Definition: exception.hpp:69
Definition: exception.hpp:97