mirror of https://github.com/akheron/jansson
test: util: Introduce fail_args()
This macro is very similar to fail() but supports variable number of arguments to print format strings. Signed-off-by: Phil Sutter <psutter@redhat.com>
This commit is contained in:
parent
c882db1056
commit
c3628e1f4d
|
@ -29,6 +29,13 @@
|
|||
exit(1); \
|
||||
} while (0)
|
||||
|
||||
#define fail_args(msg, ...) \
|
||||
do { \
|
||||
failhdr; \
|
||||
fprintf(stderr, msg "\n", __VA_ARGS__); \
|
||||
exit(1); \
|
||||
} while(0)
|
||||
|
||||
/* Assumes json_error_t error */
|
||||
#define check_errors(code_, texts_, num_, source_, line_, column_, position_) \
|
||||
do { \
|
||||
|
|
Loading…
Reference in New Issue