LAL  7.5.0.1-08ee4f4
LALError.h File Reference

Prototypes

int LALPrintError (const char *fmt,...)
 
int LALRaise (int sig, const char *fmt,...)
 
void LALAbort (const char *fmt,...)
 
int LALError (LALStatus *status, const char *statement)
 
int LALWarning (LALStatus *status, const char *warning)
 
int LALInfo (LALStatus *status, const char *info)
 
int LALTrace (LALStatus *status, int exitflg)
 
int LALInitStatus (LALStatus *status, const char *function, const char *id, const char *file, const int line)
 
int LALPrepareReturn (LALStatus *status, const char *file, const int line)
 
int LALAttatchStatusPtr (LALStatus *status, const char *file, const int line)
 
int LALDetatchStatusPtr (LALStatus *status, const char *file, const int line)
 
int LALPrepareAbort (LALStatus *status, const INT4 code, const char *mesg, const char *file, const int line)
 
int LALPrepareAssertFail (LALStatus *status, const INT4 code, const char *mesg, const char *statement, const char *file, const int line)
 
int LALCheckStatusPtr (LALStatus *status, const char *statement, const char *file, const int line)
 
int LAL_ERR_EXIT (LALStatus *, const char *func, const char *file, const int line, volatile const char *id)
 
int LAL_ERR_ABRT (LALStatus *, const char *func, const char *file, const int line, volatile const char *id)
 
int LAL_ERR_RTRN (LALStatus *, const char *func, const char *file, const int line, volatile const char *id)
 

Go to the source code of this file.

Macros

#define LALError(statusptr, statement)
 
#define LALWarning(statusptr, warning)
 
#define LALInfo(statusptr, info)
 
#define LALTrace(statusptr, exitflg)
 
#define LAL_ERR_DFLT   LAL_ERR_ABRT
 
#define LAL_CALL(function, statusptr)    ((function),lal_errhandler(statusptr,#function,__FILE__,__LINE__,"$Id$"))
 
#define LAL_FAIL_ERR   XLAL_EFAILED
 
#define LAL_FAIL_MSG   "operation failed"
 
#define LAL_NULL_ERR   XLAL_EFAULT
 
#define LAL_NULL_MSG   "unexpected NULL pointer"
 
#define LAL_NNULL_ERR   XLAL_EFAULT
 
#define LAL_NNULL_MSG   "unexpected non-NULL pointer"
 
#define LAL_NOMEM_ERR   XLAL_ENOMEM
 
#define LAL_NOMEM_MSG   "out of memory"
 
#define LAL_RANGE_ERR   XLAL_ERANGE
 
#define LAL_RANGE_MSG   "parameter out of range"
 
#define LAL_BADPARM_ERR   XLAL_EINVAL
 
#define LAL_BADPARM_MSG   "invalid parameter value"
 

Typedefs

typedef int(* lal_errhandler_t) (LALStatus *, const char *func, const char *file, const int line, volatile const char *id)
 

Variables

int(* lalRaiseHook )(int, const char *,...)
 
void(* lalAbortHook )(const char *,...)
 
lal_errhandler_t lal_errhandler
 

Macro Definition Documentation

◆ LALError

#define LALError (   statusptr,
  statement 
)
Value:
LALPrintError( "Error[%d] %d: function %s, file %s, line %d, %s\n" \
" %s %s\n", (statusptr)->level, (statusptr)->statusCode, \
(statusptr)->function, (statusptr)->file, (statusptr)->line, \
(statusptr)->Id, (statement), \
(statusptr)->statusDescription ) : 0 )
#define lalDebugLevel
Definition: LALDebugLevel.h:58
@ LALERROR
enable error messages
Definition: LALDebugLevel.h:46

Definition at line 95 of file LALError.h.

◆ LALWarning

#define LALWarning (   statusptr,
  warning 
)
Value:
LALPrintError( "Warning[%d]: function %s, file %s, line %d, %s\n" \
" %s\n", (statusptr)->level, (statusptr)->function, \
(statusptr)->file, (statusptr)->line, (statusptr)->Id, (warning) ) \
: 0 )
@ LALWARNING
enable warning messages
Definition: LALDebugLevel.h:47

Definition at line 103 of file LALError.h.

◆ LALInfo

#define LALInfo (   statusptr,
  info 
)
Value:
LALPrintError( "Info[%d]: function %s, file %s, line %d, %s\n" \
" %s\n", (statusptr)->level, (statusptr)->function, \
(statusptr)->file, (statusptr)->line, (statusptr)->Id, (info) ) \
: 0 )
@ LALINFO
enable info messages
Definition: LALDebugLevel.h:48

Definition at line 110 of file LALError.h.

◆ LALTrace

#define LALTrace (   statusptr,
  exitflg 
)
Value:
LALPrintError( "%s[%d]: function %s, file %s, line %d, %s\n", \
(exitflg) ? "Leave" : "Enter", (statusptr)->level, \
(statusptr)->function, (statusptr)->file, (statusptr)->line, \
(statusptr)->Id ) \
: 0 )
@ LALTRACE
enable tracing messages
Definition: LALDebugLevel.h:49

Definition at line 117 of file LALError.h.

◆ LAL_ERR_DFLT

#define LAL_ERR_DFLT   LAL_ERR_ABRT

Definition at line 139 of file LALError.h.

◆ LAL_CALL

#define LAL_CALL (   function,
  statusptr 
)     ((function),lal_errhandler(statusptr,#function,__FILE__,__LINE__,"$Id$"))

Definition at line 164 of file LALError.h.

◆ LAL_FAIL_ERR

#define LAL_FAIL_ERR   XLAL_EFAILED

Definition at line 173 of file LALError.h.

◆ LAL_FAIL_MSG

#define LAL_FAIL_MSG   "operation failed"

Definition at line 174 of file LALError.h.

◆ LAL_NULL_ERR

#define LAL_NULL_ERR   XLAL_EFAULT

Definition at line 175 of file LALError.h.

◆ LAL_NULL_MSG

#define LAL_NULL_MSG   "unexpected NULL pointer"

Definition at line 176 of file LALError.h.

◆ LAL_NNULL_ERR

#define LAL_NNULL_ERR   XLAL_EFAULT

Definition at line 177 of file LALError.h.

◆ LAL_NNULL_MSG

#define LAL_NNULL_MSG   "unexpected non-NULL pointer"

Definition at line 178 of file LALError.h.

◆ LAL_NOMEM_ERR

#define LAL_NOMEM_ERR   XLAL_ENOMEM

Definition at line 179 of file LALError.h.

◆ LAL_NOMEM_MSG

#define LAL_NOMEM_MSG   "out of memory"

Definition at line 180 of file LALError.h.

◆ LAL_RANGE_ERR

#define LAL_RANGE_ERR   XLAL_ERANGE

Definition at line 181 of file LALError.h.

◆ LAL_RANGE_MSG

#define LAL_RANGE_MSG   "parameter out of range"

Definition at line 182 of file LALError.h.

◆ LAL_BADPARM_ERR

#define LAL_BADPARM_ERR   XLAL_EINVAL

Definition at line 183 of file LALError.h.

◆ LAL_BADPARM_MSG

#define LAL_BADPARM_MSG   "invalid parameter value"

Definition at line 184 of file LALError.h.

Typedef Documentation

◆ lal_errhandler_t

typedef int( * lal_errhandler_t) (LALStatus *, const char *func, const char *file, const int line, volatile const char *id)

Definition at line 131 of file LALError.h.

Function Documentation

◆ LALInitStatus()

int LALInitStatus ( LALStatus status,
const char *  function,
const char *  id,
const char *  file,
const int  line 
)

Definition at line 149 of file LALError.c.

◆ LALPrepareReturn()

int LALPrepareReturn ( LALStatus status,
const char *  file,
const int  line 
)

Definition at line 182 of file LALError.c.

◆ LALAttatchStatusPtr()

int LALAttatchStatusPtr ( LALStatus status,
const char *  file,
const int  line 
)

Definition at line 200 of file LALError.c.

◆ LALDetatchStatusPtr()

int LALDetatchStatusPtr ( LALStatus status,
const char *  file,
const int  line 
)

Definition at line 225 of file LALError.c.

◆ LALPrepareAbort()

int LALPrepareAbort ( LALStatus status,
const INT4  code,
const char *  mesg,
const char *  file,
const int  line 
)

Definition at line 244 of file LALError.c.

◆ LALPrepareAssertFail()

int LALPrepareAssertFail ( LALStatus status,
const INT4  code,
const char *  mesg,
const char *  statement,
const char *  file,
const int  line 
)

Definition at line 264 of file LALError.c.

◆ LALCheckStatusPtr()

int LALCheckStatusPtr ( LALStatus status,
const char *  statement,
const char *  file,
const int  line 
)

Definition at line 285 of file LALError.c.

◆ LAL_ERR_EXIT()

int LAL_ERR_EXIT ( LALStatus stat,
const char *  func,
const char *  file,
const int  line,
volatile const char *  id 
)

Definition at line 365 of file LALError.c.

◆ LAL_ERR_ABRT()

int LAL_ERR_ABRT ( LALStatus stat,
const char *  func,
const char *  file,
const int  line,
volatile const char *  id 
)

Definition at line 381 of file LALError.c.

◆ LAL_ERR_RTRN()

int LAL_ERR_RTRN ( LALStatus stat,
const char *  func,
const char *  file,
const int  line,
volatile const char *  id 
)

Definition at line 397 of file LALError.c.

Variable Documentation

◆ lalRaiseHook

int(* lalRaiseHook) (int, const char *,...) ( int  ,
const char *  ,
  ... 
)
extern

Definition at line 57 of file LALError.c.

◆ lalAbortHook

void(* lalAbortHook) (const char *,...) ( const char *  ,
  ... 
)
extern

Definition at line 75 of file LALError.c.

◆ lal_errhandler

lal_errhandler_t lal_errhandler
extern

Definition at line 363 of file LALError.c.