nns.c
1.0.1
Nanowire Network simulator
errors.h
Go to the documentation of this file.
1
7
#ifndef ERRORS_H
8
#define ERRORS_H
9
10
#include <stdio.h>
11
#include <stdlib.h>
12
21
#define assert(EVAL, ERROR_CODE, ...) \
22
({ \
23
if (! (EVAL)) \
24
{ \
25
printf(__VA_ARGS__); \
26
exit(ERROR_CODE); \
27
} \
28
})
29
39
#define requires(EVAL, ERROR_CODE, ...) \
40
({ \
41
if (! (EVAL)) \
42
{ \
43
printf(__VA_ARGS__); \
44
return ERROR_CODE; \
45
} \
46
})
47
48
#endif
/* ERRORS_H */
headers
util
errors.h
Generated by
1.9.1