BioHDF version 0.3 alpha
Scalable NGS Data Storage Based on HDF5
Defines | Typedefs | Functions
biohdf_error

BioHDF error functions and data structures. More...

Defines

#define BIOHDF_NO_ERROR   0
 Error code for "no error".
#define BIOHDF_BADNESS   -1
 Generic "bad" error code.
#define CHECK_BIO(val)
#define CHECK_HERR_T(val)
#define CHECK_HID_T(val)
#define CHECK_PTR(val)
#define CHECK_INT_EQ(val, test)
#define CHECK_INT_NE(val, test)
#define CHECK_INT_LT(val, test)
#define CHECK_INT_GT(val, test)
#define CHECK_INT_LE(val, test)
#define CHECK_INT_GE(val, test)

Typedefs

typedef int biohdf_error
 The BioHDF error return type.

Functions

BIOHDF_API void BIOHDFset_stderr_setting (int use_stderr)
 Set whether or not error information is sent to STDERR.
BIOHDF_API void BIOHDFget_stderr_setting (int *use_stderr)
 Determine whether or not error information is sent to STDERR.
BIOHDF_API void BIOHDFemit_error_message (const char *filename, const char *function, int line)
 Write an error message.

Detailed Description

BioHDF error functions and data structures.


Define Documentation

#define CHECK_BIO (   val)
Value:
do                                                                          \
{                                                                           \
    if((val) != BIOHDF_NO_ERROR){                                           \
        BIOHDFemit_error_message(__FILE__, __func__, (int)__LINE__);        \
        goto FAIL;                                                          \
    }                                                                       \
}while(0)
#define CHECK_HERR_T (   val)
Value:
do                                                                          \
{                                                                           \
    if((val) < 0){                                                          \
        BIOHDFemit_error_message(__FILE__, __func__, (int)__LINE__);        \
        goto FAIL;                                                          \
    }                                                                       \
}while(0)
#define CHECK_HID_T (   val)
Value:
do                                                                          \
{                                                                           \
    if((val) < 0){                                                          \
        BIOHDFemit_error_message(__FILE__, __func__, (int)__LINE__);        \
        goto FAIL;                                                          \
    }                                                                       \
}while(0)
#define CHECK_INT_EQ (   val,
  test 
)
Value:
do                                                                          \
{                                                                           \
    if((val) != (test)){                                                    \
        BIOHDFemit_error_message(__FILE__, __func__, (int)__LINE__);        \
        goto FAIL;                                                          \
    }                                                                       \
}while(0)
#define CHECK_INT_GE (   val,
  test 
)
Value:
do                                                                          \
{                                                                           \
    if((val) < (test)){                                                     \
        BIOHDFemit_error_message(__FILE__, __func__, (int)__LINE__);        \
        goto FAIL;                                                          \
    }                                                                       \
}while(0)
#define CHECK_INT_GT (   val,
  test 
)
Value:
do                                                                          \
{                                                                           \
    if((val) <= (test)){                                                     \
        BIOHDFemit_error_message(__FILE__, __func__, (int)__LINE__);        \
        goto FAIL;                                                          \
    }                                                                       \
}while(0)
#define CHECK_INT_LE (   val,
  test 
)
Value:
do                                                                          \
{                                                                           \
    if((val) > (test)){                                                     \
        BIOHDFemit_error_message(__FILE__, __func__, (int)__LINE__);        \
        goto FAIL;                                                          \
    }                                                                       \
}while(0)
#define CHECK_INT_LT (   val,
  test 
)
Value:
do                                                                          \
{                                                                           \
    if((val) >= (test)){                                                     \
        BIOHDFemit_error_message(__FILE__, __func__, (int)__LINE__);        \
        goto FAIL;                                                          \
    }                                                                       \
}while(0)
#define CHECK_INT_NE (   val,
  test 
)
Value:
do                                                                          \
{                                                                           \
    if((val) == (test)){                                                    \
        BIOHDFemit_error_message(__FILE__, __func__, (int)__LINE__);        \
        goto FAIL;                                                          \
    }                                                                       \
}while(0)
#define CHECK_PTR (   val)
Value:
do                                                                          \
{                                                                           \
    if(NULL == (val)){                                                      \
        BIOHDFemit_error_message(__FILE__, __func__, (int)__LINE__);        \
        goto FAIL;                                                          \
    }                                                                       \
}while(0)

Function Documentation

BIOHDF_API void BIOHDFget_stderr_setting ( int *  use_stderr)

Determine whether or not error information is sent to STDERR.

Parameters:
[out]use_stderrFALSE if no STDERR output, TRUE if output will go to STDERR.
BIOHDF_API void BIOHDFset_stderr_setting ( int  use_stderr)

Set whether or not error information is sent to STDERR.

If this flag is not set, errors are only reported via the returned error codes.

Parameters:
use_stderrFALSE if no STDERR output, TRUE if output will go to STDERR.
 All Data Structures Variables