SysAbort

Table of Contents

SysAbort

Description

Custom abort function that can be redirected for testing purposes. By default, this calls the standard abort() function. If a callback is set via SysSetAbortCallback, it calls the callback instead.

Success

Function does not return (either aborts or calls callback).

Failure

Function cannot fail.

Usage example (Cross-references)

    }
    
    void SysAbort(void) {
    if (g_abort_callback) {
    g_abort_callback();
    
    // Forward declaration to avoid circular includes
    void SysAbort(void);
    
    ///
    LogWrite(LOG_MESSAGE_TYPE_FATAL, __func__, __LINE__, m_.data);                                                 \
    StrDeinit(&m_);                                                                                                \
    SysAbort();                                                                                                    \
    } while (0)
    LogWrite(LOG_MESSAGE_TYPE_FATAL, __func__, __LINE__, m_.data);                                                 \
    StrDeinit(&m_);                                                                                                \
    SysAbort();                                                                                                    \
    } while (0)

Share :

Related Posts

SysSetAbortCallback

SysSetAbortCallback Description Set a custom callback function for SysAbort. If no callback is set, SysAbort will call the standard abort() function.

Read More

test_deadend

test_deadend Description Run a specific test function using setjmp/longjmp to capture aborts. This is used for deadend tests that are expected to call LOG_FATAL.

Read More

bool

bool Description Function pointer type for test functions.

Read More