Go to the source code of this file.
Macros | |
#define | THROW_TYPED_EXCEPTION(msg, exceptionClass) |
#define | THROW_EXCEPTION(msg) THROW_TYPED_EXCEPTION(msg, std::logic_error); |
#define | THROW_EXCEPTION_FMT(_FORMAT_STRING, ...) THROW_EXCEPTION(mrpt::format(_FORMAT_STRING, __VA_ARGS__)); |
#define | THROW_TYPED_EXCEPTION_FMT(exceptionClass, _FORMAT_STRING, ...) |
#define | THROW_STACKED_EXCEPTION(e) |
#define | THROW_STACKED_EXCEPTION_CUSTOM_MSG2(e, stuff, param1) throw std::logic_error(throw_stacked_exception_custom_msg2(e, stuff, param1)) |
#define | MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V) |
For use in CSerializable implementations. More... | |
#define | ASSERTMSG_(f, __ERROR_MSG) |
Defines an assertion mechanism. More... | |
#define | ASSERT_(f) ASSERTMSG_(f, std::string("Assert condition failed: ") + ::std::string(#f)) |
Defines an assertion mechanism. More... | |
#define | MRPT_CHECK_NORMAL_NUMBER(v) |
Throws an exception if the number is NaN, IND, or +/-INF, or return the same number otherwise. More... | |
#define | MRPT_COMPILE_TIME_ASSERT(expression) static_assert(expression, #expression) |
#define | ASRT_FAIL(__CONDITIONSTR, __A, __B, __ASTR, __BSTR) THROW_EXCEPTION(asrt_fail(__CONDITIONSTR, __A, __B, __ASTR, __BSTR)) |
#define | ASSERT_EQUAL_(__A, __B) |
Assert comparing two values, reporting their actual values upon failure. More... | |
#define | ASSERT_NOT_EQUAL_(__A, __B) |
#define | ASSERT_BELOW_(__A, __B) |
#define | ASSERT_ABOVE_(__A, __B) |
#define | ASSERT_BELOWEQ_(__A, __B) |
#define | ASSERT_ABOVEEQ_(__A, __B) |
#define | ASSERTDEB_(f) |
Defines an assertion mechanism - only when compiled in debug. More... | |
#define | ASSERTDEBMSG_(f, __ERROR_MSG) |
#define | ASSERTDEB_EQUAL_(__A, __B) {} |
#define | ASSERTDEB_NOT_EQUAL_(__A, __B) {} |
#define | ASSERTDEB_BELOW_(__A, __B) {} |
#define | ASSERTDEB_ABOVE_(__A, __B) {} |
#define | ASSERTDEB_BELOWEQ_(__A, __B) {} |
#define | ASSERTDEB_ABOVEEQ_(__A, __B) {} |
#define | MRPT_TRY_START |
The start of a standard MRPT "try...catch()" block that allows tracing throw the call stack after an exception. More... | |
#define | MRPT_TRY_END |
The end of a standard MRPT "try...catch()" block that allows tracing throw the call stack after an exception. More... | |
#define | MRPT_TRY_END_WITH_CLEAN_UP(stuff) |
The end of a standard MRPT "try...catch()" block that allows tracing throw the call stack after an exception, including a "clean up" piece of code to be run before throwing the exceptions. More... | |
#define | MRPT_PROFILE_FUNC_START |
#define | MRPT_START |
#define | MRPT_END MRPT_TRY_END |
#define | MRPT_END_WITH_CLEAN_UP(stuff) MRPT_TRY_END_WITH_CLEAN_UP(stuff) |
Functions | |
template<typename T > | |
std::string | throw_typed_exception (const T &msg, const char *function_name, unsigned int line) |
template<typename E > | |
std::string | throw_stacked_exception (E &&e, const char *file, unsigned long line, const char *funcName) |
template<typename E , typename T > | |
std::string | throw_stacked_exception_custom_msg2 (E &&e, const char *stuff, T &¶m1) |
template<typename A , typename B > | |
std::string | asrt_fail (std::string s, A &&a, B &&b, const char *astr, const char *bstr) |
#define ASRT_FAIL | ( | __CONDITIONSTR, | |
__A, | |||
__B, | |||
__ASTR, | |||
__BSTR | |||
) | THROW_EXCEPTION(asrt_fail(__CONDITIONSTR, __A, __B, __ASTR, __BSTR)) |
Definition at line 130 of file exceptions.h.
#define ASSERT_ | ( | f | ) | ASSERTMSG_(f, std::string("Assert condition failed: ") + ::std::string(#f)) |
Defines an assertion mechanism.
Definition at line 113 of file exceptions.h.
#define ASSERT_ABOVE_ | ( | __A, | |
__B | |||
) |
Definition at line 171 of file exceptions.h.
#define ASSERT_ABOVEEQ_ | ( | __A, | |
__B | |||
) |
Definition at line 183 of file exceptions.h.
#define ASSERT_BELOW_ | ( | __A, | |
__B | |||
) |
Definition at line 165 of file exceptions.h.
#define ASSERT_BELOWEQ_ | ( | __A, | |
__B | |||
) |
Definition at line 177 of file exceptions.h.
#define ASSERT_EQUAL_ | ( | __A, | |
__B | |||
) |
Assert comparing two values, reporting their actual values upon failure.
Definition at line 153 of file exceptions.h.
#define ASSERT_NOT_EQUAL_ | ( | __A, | |
__B | |||
) |
Definition at line 159 of file exceptions.h.
#define ASSERTDEB_ | ( | f | ) |
Defines an assertion mechanism - only when compiled in debug.
Definition at line 205 of file exceptions.h.
#define ASSERTDEB_ABOVE_ | ( | __A, | |
__B | |||
) | {} |
Definition at line 214 of file exceptions.h.
#define ASSERTDEB_ABOVEEQ_ | ( | __A, | |
__B | |||
) | {} |
Definition at line 216 of file exceptions.h.
#define ASSERTDEB_BELOW_ | ( | __A, | |
__B | |||
) | {} |
Definition at line 213 of file exceptions.h.
#define ASSERTDEB_BELOWEQ_ | ( | __A, | |
__B | |||
) | {} |
Definition at line 215 of file exceptions.h.
#define ASSERTDEB_EQUAL_ | ( | __A, | |
__B | |||
) | {} |
Definition at line 211 of file exceptions.h.
#define ASSERTDEB_NOT_EQUAL_ | ( | __A, | |
__B | |||
) | {} |
Definition at line 212 of file exceptions.h.
#define ASSERTDEBMSG_ | ( | f, | |
__ERROR_MSG | |||
) |
Definition at line 208 of file exceptions.h.
#define ASSERTMSG_ | ( | f, | |
__ERROR_MSG | |||
) |
Defines an assertion mechanism.
Definition at line 101 of file exceptions.h.
#define MRPT_CHECK_NORMAL_NUMBER | ( | v | ) |
Throws an exception if the number is NaN, IND, or +/-INF, or return the same number otherwise.
Definition at line 118 of file exceptions.h.
#define MRPT_COMPILE_TIME_ASSERT | ( | expression | ) | static_assert(expression, #expression) |
Definition at line 127 of file exceptions.h.
#define MRPT_END MRPT_TRY_END |
Definition at line 266 of file exceptions.h.
#define MRPT_END_WITH_CLEAN_UP | ( | stuff | ) | MRPT_TRY_END_WITH_CLEAN_UP(stuff) |
Definition at line 268 of file exceptions.h.
#define MRPT_PROFILE_FUNC_START |
Definition at line 255 of file exceptions.h.
#define MRPT_START |
Definition at line 262 of file exceptions.h.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION | ( | __V | ) |
For use in CSerializable implementations.
Definition at line 90 of file exceptions.h.
#define MRPT_TRY_END |
The end of a standard MRPT "try...catch()" block that allows tracing throw the call stack after an exception.
Definition at line 231 of file exceptions.h.
#define MRPT_TRY_END_WITH_CLEAN_UP | ( | stuff | ) |
The end of a standard MRPT "try...catch()" block that allows tracing throw the call stack after an exception, including a "clean up" piece of code to be run before throwing the exceptions.
Definition at line 241 of file exceptions.h.
#define MRPT_TRY_START |
The start of a standard MRPT "try...catch()" block that allows tracing throw the call stack after an exception.
Definition at line 224 of file exceptions.h.
#define THROW_EXCEPTION | ( | msg | ) | THROW_TYPED_EXCEPTION(msg, std::logic_error); |
msg | This can be a char*, a std::string, or a literal string. Defines a unified way of reporting exceptions |
Definition at line 41 of file exceptions.h.
#define THROW_EXCEPTION_FMT | ( | _FORMAT_STRING, | |
... | |||
) | THROW_EXCEPTION(mrpt::format(_FORMAT_STRING, __VA_ARGS__)); |
Definition at line 43 of file exceptions.h.
#define THROW_STACKED_EXCEPTION | ( | e | ) |
Definition at line 53 of file exceptions.h.
#define THROW_STACKED_EXCEPTION_CUSTOM_MSG2 | ( | e, | |
stuff, | |||
param1 | |||
) | throw std::logic_error(throw_stacked_exception_custom_msg2(e, stuff, param1)) |
Definition at line 77 of file exceptions.h.
#define THROW_TYPED_EXCEPTION | ( | msg, | |
exceptionClass | |||
) |
Definition at line 18 of file exceptions.h.
#define THROW_TYPED_EXCEPTION_FMT | ( | exceptionClass, | |
_FORMAT_STRING, | |||
... | |||
) |
Definition at line 46 of file exceptions.h.
|
inline |
Definition at line 133 of file exceptions.h.
References mrpt::to_string().
|
inline |
Definition at line 58 of file exceptions.h.
References mrpt::to_string().
|
inline |
Definition at line 80 of file exceptions.h.
References mrpt::format().
|
inline |
Definition at line 23 of file exceptions.h.
References mrpt::to_string().
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at mié 12 jul 2023 10:03:34 CEST |