LAL  7.5.0.1-bede9b2
XLALError.c File Reference

Prototypes

int XLALVPrintError (const char *fmt, va_list ap)
 Prints an error message if error printing is enabled by lalDebugLevel. More...
 
int XLALVPrintWarning (const char *fmt, va_list ap)
 Prints a warning message if warning printing is enabled by lalDebugLevel. More...
 
int XLALVPrintInfo (const char *fmt, va_list ap)
 Prints an info message if info printing is enabled by lalDebugLevel. More...
 
int XLALPrintError (const char *fmt,...)
 
int XLALPrintWarning (const char *fmt,...)
 
int XLALPrintInfo (const char *fmt,...)
 
void XLALVPrintErrorMessage (const char *func, const char *file, int line, const char *fmt, va_list ap)
 Print an error message with standard XLAL formatting (if error messages are enabled by lalDebugLevel). More...
 
void XLALVPrintWarningMessage (const char *func, const char *file, int line, const char *fmt, va_list ap)
 Print an warning message with standard XLAL formatting (if warning messages are enabled by lalDebugLevel). More...
 
void XLALVPrintInfoMessage (const char *func, const char *file, int line, const char *fmt, va_list ap)
 Print an error message with standard XLAL formatting (if error messages are enabled by lalDebugLevel). More...
 
void XLALPrintErrorMessage (const char *func, const char *file, int line, const char *fmt,...)
 
void XLALPrintWarningMessage (const char *func, const char *file, int line, const char *fmt,...)
 
void XLALPrintInfoMessage (const char *func, const char *file, int line, const char *fmt,...)
 
int XLALPrintProgressBar (double fraction)
 Prints a progress bar at the "info" verbosity level. More...
 
int * XLALGetErrnoPtr (void)
 Function to return pointer to the XLAL error number. More...
 
XLALErrorHandlerType ** XLALGetErrorHandlerPtr (void)
 Function to return pointer to the XLAL error handler function pointer. More...
 
int XLALSetErrno (int errnum)
 Sets the XLAL error number to errnum, returns the new value. More...
 
int XLALGetBaseErrno (void)
 Gets the XLAL base error number ignoring the internal-function-failed flag. More...
 
int XLALClearErrno (void)
 Clears the XLAL error number, returns the old value. More...
 
XLALErrorHandlerTypeXLALSetErrorHandler (XLALErrorHandlerType *newHandler)
 Sets the error handler to a new handler and returns the old handler. More...
 
XLALErrorHandlerTypeXLALSetDefaultErrorHandler (void)
 Sets the error handler to the default handler and returns the old handler. More...
 
XLALErrorHandlerTypeXLALSetSilentErrorHandler (void)
 Sets the error handler to a silent handler and returns the old handler. More...
 
const char * XLALErrorString (int code)
 Returns the error message associated with an error number. More...
 
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. More...
 
void XLALDefaultErrorHandler (const char *func, const char *file, int line, int errnum)
 The default XLAL error handler. More...
 
void XLALSilentErrorHandler (const char UNUSED *func, const char UNUSED *file, int UNUSED line, int UNUSED errnum)
 
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. More...
 
void XLALAbortErrorHandler (const char *func, const char *file, int line, int errnum)
 The XLAL error handler that raises SIGABRT. More...
 
void XLALExitErrorHandler (const char *func, const char *file, int line, int errnum)
 The XLAL error handler that calls exit. More...
 
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. More...
 

Go to the source code of this file.

Macros

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

Variables

int xlalErrnoGlobal = 0
 
XLALErrorHandlerTypexlalErrorHandlerGlobal = NULL
 

Macro Definition Documentation

◆ XLAL_ERROR_STRING

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

Function Documentation

◆ XLALPrintError()

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

Definition at line 68 of file XLALError.c.

◆ XLALPrintWarning()

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

Definition at line 79 of file XLALError.c.

◆ XLALPrintInfo()

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

Definition at line 90 of file XLALError.c.

◆ XLALPrintErrorMessage()

void XLALPrintErrorMessage ( const char *  func,
const char *  file,
int  line,
const char *  fmt,
  ... 
)

Definition at line 146 of file XLALError.c.

◆ XLALPrintWarningMessage()

void XLALPrintWarningMessage ( const char *  func,
const char *  file,
int  line,
const char *  fmt,
  ... 
)

Definition at line 156 of file XLALError.c.

◆ XLALPrintInfoMessage()

void XLALPrintInfoMessage ( const char *  func,
const char *  file,
int  line,
const char *  fmt,
  ... 
)

Definition at line 166 of file XLALError.c.

◆ XLALSilentErrorHandler()

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

Definition at line 569 of file XLALError.c.

Variable Documentation

◆ xlalErrnoGlobal

int xlalErrnoGlobal = 0

Definition at line 206 of file XLALError.c.

◆ xlalErrorHandlerGlobal

XLALErrorHandlerType* xlalErrorHandlerGlobal = NULL

Definition at line 215 of file XLALError.c.