Go to the documentation of this file.
65 #ifndef XSENS_MATH_THROW_H
66 #define XSENS_MATH_THROW_H
70 #ifdef XSENS_NO_EXCEPTIONS
72 #define XSNOEXCEPT_ARG(a)
76 #define XM_THROW(a) XSENS_FW_ASSERT_FUNC(a, __FILE__, (unsigned) __LINE__)
77 #define XM_THROW_DEFINED 1
79 #define XM_THROW(a) ((void) 0)
80 #define XM_THROW_DEFINED 0
84 #define XM_THROW_DEFINED 1
86 #if __cplusplus >= 201103L
87 #define XSNOEXCEPT noexcept
88 #define XSNOEXCEPT_ARG(a) noexcept(#a)
91 #define XSNOEXCEPT_ARG(a)
96 #define XETHROW(a) throw XsException(XRV_ERROR, XsString(__FUNCTION__ " ") << XsString(a))
97 #elif defined __GNUC__
98 #define XETHROW(a) throw XsException(XRV_ERROR, XsString(__PRETTY_FUNCTION__) << " " << XsString(a))
100 #define XETHROW(a) throw XsException(XRV_ERROR, XsString(__func__) << " " << XsString(a))
103 #define XETHROW(a) throw (a)
106 #if defined(XSENS_DEBUG) && defined(_WIN32) // && !defined(_WIN64) unclear why this clause was added in xsens_math.h rev 871 by RZA
107 #define XM_THROW(a) do { xsens::DebugTools::mathThrowBreakFunc(); XETHROW(a); } while(0)
109 #define XM_THROW(a) do { XETHROW(a); } while(0)