Bioplib
Protein Structure C Library
|
Build and print an error stack for program failure. More...
Go to the source code of this file.
Macros | |
#define | _ERRSTACK_H_DEPRECATED |
Functions | |
void | blStoreError (char *routine, char *error) |
void | blShowErrors (void *PrintRoutine(char *), BOOL Trace) |
Build and print an error stack for program failure.
This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.
The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.
The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.
This set of routines allows a stack of errors to be created. When a program has a fatal error, the StoreError() routine is called to place the error on the stack. As the program un-winds, each routine which fails stores it's error. Finally, before the program actually exits, it calls ShowErrors() to display the error stack.
Definition in file ErrStack.h.
#define _ERRSTACK_H_DEPRECATED |
Definition at line 78 of file ErrStack.h.
void blShowErrors | ( | void * | PrintRoutinechar *, |
BOOL | Trace | ||
) |
[in] | *PrintRoutine | The print routine or NULL |
[in] | Trace | Flag to print routine names |
Display the error stack using the supplied print routine or the simple default one if NULL is given.
Definition at line 182 of file ErrStack.c.
void blStoreError | ( | char * | routine, |
char * | error | ||
) |
[in] | *routine | Name of the routine generating the error |
[in] | *error | Description of the error |
Stores an error on the error stack.
Definition at line 137 of file ErrStack.c.