OPIC
Object Persistence In C
|
Macros | |
#define | op_assert(X, ...) |
assert with diagnosis messages. This macro emits the function, file, line nuber and stack traces. More... | |
#define | op_assert_diagnose(X, cb, ...) |
assert with callback. More... | |
#define op_assert | ( | X, | |
... | |||
) |
#include <opic/common/op_assert.h>
assert with diagnosis messages. This macro emits the function, file, line nuber and stack traces.
X | A C expression user expects to be true |
... | printf like format string and arguments. |
Example usage:
Definition at line 77 of file op_assert.h.
#define op_assert_diagnose | ( | X, | |
cb, | |||
... | |||
) |
#include <opic/common/op_assert.h>
assert with callback.
X | A C expression user expects to be true |
cb | A callback function. |
... | Arguments to pass to the callback function. |
When the assertion failed, it first print the function name, file name, and line number where this macro was written. Then it invokes the callback with the arguments user specified. Finally it prints the stacktrace.
Example usage:
Definition at line 111 of file op_assert.h.