NDEVR
API Documentation
LibAssert

The default way to make Assert statements within the NDEVR API. More...

Static Public Member Functions

static void NAssert (const char *const _Expression, const char *const _Message, const char *const _File, unsigned _Line)
 Handles a failed assertion by reporting the expression, message, file, and line.

Static Public Attributes

static std::function< void(const char *const _Expression, const char *const _Message, const char *const _File, unsigned _Line)> s_assert_callback
 Optional callback invoked when an assertion fails.

Detailed Description

The default way to make Assert statements within the NDEVR API.


A no-op in release but throws an exception in debug.

Definition at line 50 of file LibAssert.h.

Member Function Documentation

◆ NAssert()

void LibAssert::NAssert ( const char *const _Expression,
const char *const _Message,
const char *const _File,
unsigned _Line )
static

Handles a failed assertion by reporting the expression, message, file, and line.

Parameters
[in]_ExpressionThe stringified expression that evaluated to false.
[in]_MessageA human-readable message describing the assertion failure.
[in]_FileThe source file path where the assertion failed.
[in]_LineThe line number in the source file where the assertion failed.

Member Data Documentation

◆ s_assert_callback

std::function<void(const char* const _Expression, const char* const _Message, const char* const _File, unsigned _Line)> LibAssert::s_assert_callback
static

Optional callback invoked when an assertion fails.

Default is null. Set this to override the default assertion failure behavior with custom handling.

Definition at line 65 of file LibAssert.h.


The documentation for this class was generated from the following file: