next up previous contents index
Next: Header LALStatusMacros.h Up: Header LALDatatypes.h Previous: Structured datatypes   Contents   Index


The LAL universal status structure LALStatus

This structure is the means by which LAL functions report their success or failure; it provides a useful mechanism for tracking progress and errors through nested function calls. The error reporting structure is a linked list of LALStatus structures, with each node corresponding to a given function in the current calling sequence. When a function terminates successfully, its node is dropped from the list. If a function encounters an error, it must still return control to the calling routine, reporting the error through its LALStatus. The calling routine must either deal with the error (pruning the linked list if it succeeds), or else return an error itself. A fatal error will thus return a linked list of LALStatus structures to the top-level routine, where the tail of the list identifies the source of the error, and the intermediate nodes identify the sequence of nested function calls that led to the error. The fields of the LALStatus are as follows:

INT4 statusCode
A numerical code identifying the type of error, or 0 for nominal status.
const CHAR *statusDescription
A description of the current status or error.
volatile const CHAR *Id
The RCS ID string of the source file of the current function.
const CHAR *function
The name of the current function.
const CHAR *file
The name of the source file of the current function.
INT4 line
The line number in the source file where the current statusCode was set.
LALStatus *statusPtr
Pointer to the next node in the list; NULL if this function is not reporting a subroutine error.
INT4 level
The current level in the nested calling sequence.



Author: J. D. E. Creighton, T. D. Creighton
$Id: LALDatatypes.h,v 1.13 2003/06/19 21:13:52 jolien Exp $


next up previous contents index
Next: Header LALStatusMacros.h Up: Header LALDatatypes.h Previous: Structured datatypes   Contents   Index
LAL test account 2003-10-23