libassa 3.5.1
|
A collection of assert function wrappers. More...
Go to the source code of this file.
Macros | |
#define | Assure_exit(exp_) |
Macro that makes program exit if assert fails. | |
#define | Assure_return(exp_) |
Test condition and return bool from a function if assertion fails. | |
#define | Assure_return_void(exp_) |
Test condition and return from a function immediately if assertion fails. | |
#define | Assure_return_value(exp_, value_) |
Test condition and return value_ from a function if assertion fails. | |
A collection of assert function wrappers.
Definition in file Assure.h.
#define Assure_exit | ( | exp_ | ) |
Macro that makes program exit if assert fails.
assert a la ASSA. If expression exp_ is evaluated to false, error message is logged and current process is terminated with SIGTERM signal.
exp_ | expression to evaluate |
Definition at line 39 of file Assure.h.
#define Assure_return | ( | exp_ | ) |
Test condition and return bool from a function if assertion fails.
Expression exp_ is evaluated and tested for the truth. If expression is false, error message with file name and line number is logged to the log file, and program control is returned back from current execution scope with return value equal to FALSE.
exp_ | expression to evaluate |
Definition at line 64 of file Assure.h.
#define Assure_return_value | ( | exp_, | |
value_ | |||
) |
Test condition and return value_ from a function if assertion fails.
Expression exp_ is evaluated and tested for the truth. If expression is false, error message with file name and line number is logged to the log file, and program control is returned back from current execution scope with return value equal to value_.
exp_ | expression to evaluate |
value_ | value to return |
Definition at line 109 of file Assure.h.
#define Assure_return_void | ( | exp_ | ) |
Test condition and return from a function immediately if assertion fails.
Expression exp_ is evaluated and tested for the truth. If expression is false, error message with file name and line number is logged to the log file, and program control is returned back from current execution scope.
exp_ | expression to evaluate |
Definition at line 84 of file Assure.h.