Skip to content

AbortCallback

Description

Function pointer type for Abort callback. This allows custom handling of abort situations (e.g., for testing).

Usage example (Cross-references)

Usage examples (Cross-references)
    /// TAGS: System, Testing, Callback
    ///
    void OnAbort(AbortCallback callback);
    
    ///
    // through to the hardware trap. Set by `OnAbort` -- the test harness
    // uses it to longjmp out of intentional aborts in deadend fixtures.
    static AbortCallback g_abort_callback = NULL;
    
    void OnAbort(AbortCallback callback) {
    static AbortCallback g_abort_callback = NULL;
    
    void OnAbort(AbortCallback callback) {
        g_abort_callback = callback;
    }
Last updated on