br_diag_failure_cbfn
failure
member of the br_diaghandler
115
structure.
typedef
brdiag.h
for a precise declaration)
void br_diag_failure_cbfn(const char *) Handle failure and message
Pointer to zero terminated character string describing the failure.
Specification
Description:
An application defined call-back function that is called upon a serious, unexpected error or failure, with a descriptive message. Remember, a release version of your software should never fail.CBFnDiagFailure()
void BR_CALLBACK CBFnDiagFailure(const char* message)
const char * message
BrDiagHandlerSet()
116). BRender has not necessarily completed initialisation. In an unknown state. A failure has occurred. BRender is not expecting the function to return.
Effects: Behaviour is up to the application, but the following procedure can be taken as a suggestion.
Set a failure condition flag (to detect escalation). Optionally, immediately inform user of failure. Re-establish a known state. Perform diagnostics of hardware and software, inform user of any diagnosed faults (optionally, also of original failure). End failure condition, and resume (do not return).
Remarks: Avoid allocating memory in your failure call-back function, or you may need special care in handling out-of-memory conditions. BRender's default failure call-back function does not allocate memory.
Example: See
stddiag.c
for examples of diagnostic handler functions.See Also:
CBFnDiagWarning()
114
.