Twitch SDK (Internal)
Typedefs | Functions
ttv::assertion Namespace Reference

Typedefs

typedef bool(* AssertHandler) (const char *component, const char *expr, const char *file, int line)
 

Functions

AssertHandler SetAssertHandler (AssertHandler assertHandler)
 
bool AssertFailed (const char *component, const char *expr, const char *file, int line)
 

Typedef Documentation

◆ AssertHandler

typedef bool(* ttv::assertion::AssertHandler) (const char *component, const char *expr, const char *file, int line)

The definition for the assertion handling callback used by SetAssertHandler. The assert has already failed when this is called.

component: The sdk componen the assert belongs to expr: A text representation of the expression that failed file: The file the assert occurred in line: The line in the file the assert occurred on

Function Documentation

◆ AssertFailed()

bool ttv::assertion::AssertFailed ( const char *  component,
const char *  expr,
const char *  file,
int  line 
)

◆ SetAssertHandler()

AssertHandler ttv::assertion::SetAssertHandler ( AssertHandler  assertHandler)

Sets the callback that allows the application to handle a failed assertion. Returning true from this will aborb the assertion and allow the program to continue. Returning false will pass the failed assert to the standard assertion function for the platform.