Loading...
Searching...
No Matches
Go to the documentation of this file.
15#ifndef IOX2_BB_DETAIL_ASSERTIONS_HPP
16#define IOX2_BB_DETAIL_ASSERTIONS_HPP
39#define IOX2_PANIC(message) iox2::legacy::er::forwardPanic(iox2::bb::detail::SourceLocation::current(), message)
49#define IOX2_ASSERT_INTERNAL(location, condition, stringified_condition, message) \
50 if (iox2::legacy::er::Configuration::CHECK_ASSERT && !(condition)) { \
51 iox2::legacy::er::forwardFatalError(iox2::legacy::er::Violation::createAssertViolation(), \
52 iox2::legacy::er::ASSERT_VIOLATION, \
54 stringified_condition, \
63#define IOX2_ASSERT(condition, message) \
64 IOX2_ASSERT_INTERNAL(iox2::bb::detail::SourceLocation::current(), condition, #condition, message)
67#define IOX2_ENFORCE_INTERNAL(location, condition, stringified_condition, message) \
69 iox2::legacy::er::forwardFatalError(iox2::legacy::er::Violation::createEnforceViolation(), \
70 iox2::legacy::er::ENFORCE_VIOLATION, \
72 stringified_condition, \
81#define IOX2_ENFORCE(condition, message) \
82 IOX2_ENFORCE_INTERNAL(iox2::bb::detail::SourceLocation::current(), condition, #condition, message)
85#define IOX2_UNREACHABLE() \
86 iox2::legacy::er::detail::unreachable_wrapped<void, void>(iox2::bb::detail::SourceLocation::current(), \
87 "Reached code that was supposed to be unreachable.")
91#define IOX2_TODO() iox2::legacy::er::forwardPanic(iox2::bb::detail::SourceLocation::current(), "Not yet implemented!")