next up previous contents FITSIO Home
Next: 4.2 File Open/Close Routines Up: 4 CFITSIO Routines Previous: 4 CFITSIO Routines   Contents

4.1 Error Reporting

void fits_report_error(FILE *stream, int status)
void fits_get_errstatus(int status, char *err_text)
float fits_get_version(float *version)

The first routine prints out information about any error that has occurred. Whenever any CFITSIO routine encounters an error it usually writes a message describing the nature of the error to an internal error message stack and then returns with a positive integer status value. Passing the error status value to this routine will cause a generic description of the error and all the messages from the internal CFITSIO error stack to be printed to the specified stream. The stream parameter is usually set equal to "stdout" or "stderr".

The second routine simply returns a 30-character descriptive error message corresponding to the input status value.

The last routine returns the current CFITSIO library version number.