except.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define __DEV_FUNCTION__   ((const char *) 0)
#define ILL_CHECKnull(expr, msg)
#define ILL_CLEANUP   goto CLEANUP
#define ILL_CLEANUP_IF(rval)   { if ((rval) != 0) { goto CLEANUP; } }
#define ILL_ERROR(rval, msg)
#define ILL_FAILfalse(expr, msg)   ILL_FAILtrue(!(expr), msg)
#define ILL_FAILfalse_no_rval(expr, msg)   ILL_FAILtrue_no_rval(!(expr), msg)
#define ILL_FAILtrue(expr, msg)
#define ILL_FAILtrue_no_rval(expr, msg)
#define ILL_GENERAL_ERROR   -1
#define ILL_NEW(ptr, type)   ILL_SAFE_MALLOC(ptr, 1, type)
#define ILL_NEW_no_rval(ptr, type)   ILL_SAFE_MALLOC_no_rval(ptr, 1, type)
#define ILL_NO_MEMORY   2
#define ILL_NULL_PTR   3
#define ILL_REPORT(msg, with)   ILL_report(msg, __DEV_FUNCTION__, __FILE__, __LINE__, with)
#define ILL_REPRT(msg)   ILL_report(msg, __DEV_FUNCTION__, __FILE__, __LINE__, 1)
#define ILL_RESULT(expr, msg)
#define ILL_RETURN(expr, msg)
#define ILL_RETURN_PTR(ptr, msg)
#define ILL_SAFE_MALLOC(lhs, n, type)
#define ILL_SAFE_MALLOC_no_rval(lhs, n, type)

Functions

void ILL_report (const char *msg, const char *fct, const char *file, unsigned int line, int with_source_info)

Variables

int __QS_SB_VERB


Define Documentation

#define __DEV_FUNCTION__   ((const char *) 0)

Definition at line 44 of file except.h.

#define ILL_CHECKnull ( expr,
msg   ) 

Value:

{ if ((expr) == NULL)  {  \
         ILL_REPRT(msg); \
         rval = ILL_NULL_PTR; \
         goto CLEANUP;  \
      } }

Definition at line 115 of file except.h.

#define ILL_CLEANUP   goto CLEANUP

Definition at line 144 of file except.h.

#define ILL_CLEANUP_IF ( rval   )     { if ((rval) != 0) { goto CLEANUP; } }

Definition at line 143 of file except.h.

#define ILL_ERROR ( rval,
msg   ) 

Value:

{                 \
                  fprintf(stderr, "%s\n", msg); \
                  rval = 1; goto CLEANUP;     \
                  }

Definition at line 139 of file except.h.

#define ILL_FAILfalse ( expr,
msg   )     ILL_FAILtrue(!(expr), msg)

Definition at line 136 of file except.h.

#define ILL_FAILfalse_no_rval ( expr,
msg   )     ILL_FAILtrue_no_rval(!(expr), msg)

Definition at line 137 of file except.h.

#define ILL_FAILtrue ( expr,
msg   ) 

Value:

{ if (expr)  {  \
         ILL_REPRT(msg); \
         rval = ILL_GENERAL_ERROR; \
         goto CLEANUP;  \
      } }

Definition at line 122 of file except.h.

#define ILL_FAILtrue_no_rval ( expr,
msg   ) 

Value:

{ if (expr)  {  \
         ILL_REPRT(msg); \
         goto CLEANUP;  \
      } }

Definition at line 129 of file except.h.

#define ILL_GENERAL_ERROR   -1

Definition at line 67 of file except.h.

#define ILL_NEW ( ptr,
type   )     ILL_SAFE_MALLOC(ptr, 1, type)

Definition at line 162 of file except.h.

#define ILL_NEW_no_rval ( ptr,
type   )     ILL_SAFE_MALLOC_no_rval(ptr, 1, type)

Definition at line 163 of file except.h.

#define ILL_NO_MEMORY   2

Definition at line 68 of file except.h.

#define ILL_NULL_PTR   3

Definition at line 69 of file except.h.

#define ILL_REPORT ( msg,
with   )     ILL_report(msg, __DEV_FUNCTION__, __FILE__, __LINE__, with)

Definition at line 71 of file except.h.

#define ILL_REPRT ( msg   )     ILL_report(msg, __DEV_FUNCTION__, __FILE__, __LINE__, 1)

Definition at line 77 of file except.h.

#define ILL_RESULT ( expr,
msg   ) 

Value:

{               \
  if (TRACE > 0) { ILL_RETURN(expr, msg); } \
    return expr; \
}

Definition at line 81 of file except.h.

#define ILL_RETURN ( expr,
msg   ) 

Value:

{                 \
    if (expr != 0) {                \
      ILL_REPRT(msg);             \
    }                               \
    ILL_IFTRACE("%s: returning %d\n", __DEV_FUNCTION__, expr); \
    return expr;          \
  }

Definition at line 105 of file except.h.

#define ILL_RETURN_PTR ( ptr,
msg   ) 

Value:

{ void *ILL_RETURN_p = ptr; \
      if (ILL_RETURN_p == NULL) {  \
        if (TRACE > 0) ILL_REPRT(msg); \
      } \
      return ILL_RETURN_p;  \
    }

Definition at line 87 of file except.h.

#define ILL_SAFE_MALLOC ( lhs,
n,
type   ) 

Value:

{ lhs = ILL_UTIL_SAFE_MALLOC(n, type, lhs); \
      if (lhs == NULL)  {  \
         ILL_REPRT("Out of memory"); \
         rval = ILL_NO_MEMORY; \
         goto CLEANUP;  \
      }}

Definition at line 146 of file except.h.

#define ILL_SAFE_MALLOC_no_rval ( lhs,
n,
type   ) 

Value:

{ lhs = ILL_UTIL_SAFE_MALLOC(n, type, lhs); \
      if (lhs == NULL)  {  \
         ILL_REPRT("Out of memory"); \
         goto CLEANUP;  \
      }}

Definition at line 154 of file except.h.


Function Documentation

void ILL_report ( const char *  msg,
const char *  fct,
const char *  file,
unsigned int  line,
int  with_source_info 
)

Definition at line 32 of file except.c.


Variable Documentation

int __QS_SB_VERB

Definition at line 60 of file except.c.


Generated on Thu Mar 29 09:35:19 2012 for QSopt_ex by  doxygen 1.4.7