SetAbortCallback
Description
Set a custom callback function for Abort. If no callback is set, Abort will call the standard abort() function.
Parameters
| Name | Direction | Description |
|---|---|---|
callback |
in | Function to call when Abort is invoked, or NULL to reset to default. |
Success
Callback is set.
Failure
Function cannot fail.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
TestRunner.c:33:
// Set our custom abort handler
SetAbortCallback(test_abort_handler);
// For non-deadend tests, run normally
- In
TestRunner.c:68:
// Reset abort handler to default
SetAbortCallback(NULL);
return test_result;- In
Sys.c:85:
static AbortCallback g_abort_callback = NULL;
void SetAbortCallback(AbortCallback callback) {
g_abort_callback = callback;
}
Last updated on