24 formatAssertMessage(
file, lineNo, numArgs, arg1, arg2, arg3, arg4, arg5, arg6, destBuffer,
25 static_cast<FwSizeType>(
sizeof(destBuffer)));
34 AssertHook* AssertHook::s_assertHook =
nullptr;
37 this->previousHook = s_assertHook;
42 s_assertHook = this->previousHook;
60 if (
nullptr == registeredHook) {
62 formatAssertMessage(
file, lineNo, numArgs, arg1, arg2, arg3, arg4, arg5, arg6, assertMsg,
63 static_cast<FwSizeType>(
sizeof(assertMsg)));
67 registeredHook->
reportAssert(
file, lineNo, numArgs, arg1, arg2, arg3, arg4, arg5, arg6);
70 #if FW_ASSERTIONS_ALWAYS_ABORT void formatAssertMessage(FILE_NAME_ARG file, FwSizeType lineNo, FwSizeType numArgs, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6, CHAR *destBuffer, FwSizeType buffSize)
format an assert message
I8 CAssert1(FILE_NAME_ARG file, FwAssertArgType arg1, FwSizeType lineNo)
PlatformSizeType FwSizeType
I8 CAssert2(FILE_NAME_ARG file, FwAssertArgType arg1, FwAssertArgType arg2, FwSizeType lineNo)
FW_ASSERT_NORETURN void defaultSwAssert(FILE_NAME_ARG file, FwSizeType lineNo, FwSizeType numArgs, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6)
int8_t I8
8-bit signed integer
static AssertHook * getRegisteredHook()
void SwAssert(FILE_NAME_ARG file, FwSizeType lineNo)
Assert with no arguments.
I8 CAssert3(FILE_NAME_ARG file, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwSizeType lineNo)
void printAssertMessage(const CHAR *msg)
print an assert message
#define FW_ASSERT_TEXT_SIZE
Size of string used to store assert description // NO_CODESONAR LANG.PREPROC.MACROSTART/END.
virtual void reportAssert(FILE_NAME_ARG file, FwSizeType lineNo, FwSizeType numArgs, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6)
destructor
I8 CAssert6(FILE_NAME_ARG file, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6, FwSizeType lineNo)
virtual void printAssert(const CHAR *msg)
I8 CAssert0(FILE_NAME_ARG file, FwSizeType lineNo)
I8 CAssert5(FILE_NAME_ARG file, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwSizeType lineNo)
Implementation of malloc based allocator.
I8 CAssert4(FILE_NAME_ARG file, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwSizeType lineNo)
void terminateOnAssert()
terminate after a failed assertion
#define FW_ASSERT_NORETURN
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.