ecoli_assert - Man Page
Name
ecoli_assert — Assert
— Assertion helpers.
Synopsis
Macros
#define ec_assert_print(expr, args...)
#define EC_CHECK_ARG(cond, ret, err)
Detailed Description
Assertion helpers.
Helpers to check at runtime if a condition is true, or otherwise either abort (exit program) or return an error.
Macro Definition Documentation
#define ec_assert_print( expr, args...)
Value:
__ec_assert_print(expr, #expr, args)
Abort if the condition is false.
If expression is false this macro will prints an error message to standard error and terminates the program by calling abort(3).
- Parameters
expr The expression to be checked.
args The format string, optionally followed by other arguments.
Definition at line 35 of file ecoli_assert.h.
#define EC_CHECK_ARG( cond, ret, err)
Value:
do { \ if (!(cond)) { \ errno = err; \ return ret; \ } \ } while(0)
Check a condition or return.
If the condition is true, do nothing. If it is false, set errno and return the specified value.
- Parameters
cond The condition to test.
ret The value to return.
err The errno to set.
Definition at line 61 of file ecoli_assert.h.
Author
Generated automatically by Doxygen for Libecoli from the source code.
Referenced By
The man pages ec_assert_print(3) and EC_CHECK_ARG(3) are aliases of ecoli_assert(3).