XLALError.c File Reference

Author:
Creighton, J.Standard XLAL error routines.
More...

#include <math.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <lal/XLALError.h>
#include <lal/LALStdlib.h>

Include dependency graph for XLALError.c:

Go to the source code of this file.

Defines

#define XLAL_ERROR_STRING(s)   ( ( code & XLAL_EFUNC ) ? "Internal function call failed: " s : s )

Functions

 NRCSID (XLALERRORC,"$Id: XLALError.c,v 1.13 2008/04/24 17:04:21 kipp Exp $")
int XLALPrintError (const char *fmt,...)
 Prints an error message if error printing is enabled by lalDebugLevel.
int XLALPrintWarning (const char *fmt,...)
 Prints a warning message if warning printing is enabled by lalDebugLevel.
int XLALPrintInfo (const char *fmt,...)
 Prints an info message if info printing is enabled by lalDebugLevel.
int XLALPrintProgressBar (double fraction)
 Prints a progress bar at the "info" verbosity level.
int XLALPrintDeprecationWarning (const char *old, const char *replacement)
 Prints a deprecation warning at the "warning" verbosity level.
int * XLALGetErrnoPtr (void)
 Function to return pointer to the XLAL error number.
XLALErrorHandlerType ** XLALGetErrorHandlerPtr (void)
 Function to return pointer to the XLAL error handler function pointer.
int XLALSetErrno (int errnum)
 Sets the XLAL error number to errnum, returns the new value.
int XLALGetBaseErrno (void)
 Gets the XLAL base error number ignoring the internal-function-failed flag.
int XLALClearErrno (void)
 Clears the XLAL error number, returns the old value.
XLALErrorHandlerTypeXLALSetErrorHandler (XLALErrorHandlerType *newHandler)
 Sets the error handler to a new handler and returns the old handler.
XLALErrorHandlerTypeXLALSetDefaultErrorHandler (void)
 Sets the error handler to the default handler and returns the old handler.
XLALErrorHandlerTypeXLALSetSilentErrorHandler (void)
 Sets the error handler to a silent handler and returns the old handler.
const char * XLALErrorString (int code)
 Returns the error message associated with an error number.
void XLALPerror (const char *func, const char *file, int line, int code)
 Prints an error message for a particular error code in a standard format.
void XLALDefaultErrorHandler (const char *func, const char *file, int line, int errnum)
 The default XLAL error handler.
void XLALSilentErrorHandler (const char *func, const char *file, int line, int errnum)
 A silent XLAL error handler.
void XLALError (const char *func, const char *file, int line, int errnum)
 Routine to set the XLAL error number and invoke the XLAL error handler.
void XLALAbortErrorHandler (const char *func, const char *file, int line, int errnum)
 The XLAL error handler that raises SIGABRT.
void XLALExitErrorHandler (const char *func, const char *file, int line, int errnum)
 The XLAL error handler that calls exit.
void XLALBacktraceErrorHandler (const char *func, const char *file, int line, int errnum)
 The XLAL error handler that prints a function call backtrace then raises SIGABRT.

Variables

int xlalErrnoGlobal = 0
XLALErrorHandlerTypexlalErrorHandlerGlobal = NULL


Detailed Description

Author:
Creighton, J.Standard XLAL error routines.

D. E.

Date:
Date
2008/04/24 17:04:21
Id
XLALError.c,v 1.13 2008/04/24 17:04:21 kipp Exp

Definition in file XLALError.c.


Define Documentation

#define XLAL_ERROR_STRING ( s   )     ( ( code & XLAL_EFUNC ) ? "Internal function call failed: " s : s )


Function Documentation

NRCSID ( XLALERRORC  ,
"$Id: XLALError.  c,
v 1.13 2008/04/24 17:04:21 kipp Exp $"   
)

int XLALPrintError ( const char *  fmt,
  ... 
)

Prints an error message if error printing is enabled by lalDebugLevel.

Definition at line 45 of file XLALError.c.

int XLALPrintWarning ( const char *  fmt,
  ... 
)

Prints a warning message if warning printing is enabled by lalDebugLevel.

Definition at line 59 of file XLALError.c.

int XLALPrintInfo ( const char *  fmt,
  ... 
)

Prints an info message if info printing is enabled by lalDebugLevel.

Definition at line 73 of file XLALError.c.

int XLALPrintProgressBar ( double   ) 

Prints a progress bar at the "info" verbosity level.

Definition at line 90 of file XLALError.c.

int XLALPrintDeprecationWarning ( const char *  old,
const char *  replacement 
)

Prints a deprecation warning at the "warning" verbosity level.

Definition at line 104 of file XLALError.c.

int* XLALGetErrnoPtr ( void   ) 

Function to return pointer to the XLAL error number.

Definition at line 123 of file XLALError.c.

XLALErrorHandlerType** XLALGetErrorHandlerPtr ( void   ) 

Function to return pointer to the XLAL error handler function pointer.

Definition at line 132 of file XLALError.c.

int XLALSetErrno ( int  errnum  ) 

Sets the XLAL error number to errnum, returns the new value.

Definition at line 237 of file XLALError.c.

int XLALGetBaseErrno ( void   ) 

Gets the XLAL base error number ignoring the internal-function-failed flag.

Definition at line 264 of file XLALError.c.

int XLALClearErrno ( void   ) 

Clears the XLAL error number, returns the old value.

Definition at line 271 of file XLALError.c.

XLALErrorHandlerType* XLALSetErrorHandler ( XLALErrorHandlerType newHandler  ) 

Sets the error handler to a new handler and returns the old handler.

Definition at line 280 of file XLALError.c.

XLALErrorHandlerType* XLALSetDefaultErrorHandler ( void   ) 

Sets the error handler to the default handler and returns the old handler.

Definition at line 290 of file XLALError.c.

XLALErrorHandlerType* XLALSetSilentErrorHandler ( void   ) 

Sets the error handler to a silent handler and returns the old handler.

Definition at line 299 of file XLALError.c.

const char* XLALErrorString ( int  code  ) 

Returns the error message associated with an error number.

Definition at line 316 of file XLALError.c.

void XLALPerror ( const char *  func,
const char *  file,
int  line,
int  code 
)

Prints an error message for a particular error code in a standard format.

Definition at line 441 of file XLALError.c.

void XLALDefaultErrorHandler ( const char *  func,
const char *  file,
int  line,
int  errnum 
)

The default XLAL error handler.

Definition at line 465 of file XLALError.c.

void XLALSilentErrorHandler ( const char *  func,
const char *  file,
int  line,
int  errnum 
)

A silent XLAL error handler.

Definition at line 472 of file XLALError.c.

void XLALError ( const char *  func,
const char *  file,
int  line,
int  errnum 
)

Routine to set the XLAL error number and invoke the XLAL error handler.

It is used by the error macros.

Parameters:
func  name of function where the error occurs
file  source file name (use the __FILE__ macro)
line  source line number (use the __LINE__ macro)
errnum  error code

Definition at line 487 of file XLALError.c.

void XLALAbortErrorHandler ( const char *  func,
const char *  file,
int  line,
int  errnum 
)

The XLAL error handler that raises SIGABRT.

Definition at line 504 of file XLALError.c.

void XLALExitErrorHandler ( const char *  func,
const char *  file,
int  line,
int  errnum 
)

The XLAL error handler that calls exit.

Definition at line 512 of file XLALError.c.

void XLALBacktraceErrorHandler ( const char *  func,
const char *  file,
int  line,
int  errnum 
)

The XLAL error handler that prints a function call backtrace then raises SIGABRT.

Definition at line 521 of file XLALError.c.


Variable Documentation

int xlalErrnoGlobal = 0

Definition at line 120 of file XLALError.c.

XLALErrorHandlerType* xlalErrorHandlerGlobal = NULL

Definition at line 129 of file XLALError.c.


Generated on Fri Sep 5 03:08:36 2008 for LAL by  doxygen 1.5.2