aboutsummaryrefslogtreecommitdiffstats
path: root/src/err.h
blob: dd097fcf9c809dea91a192bb1d6927c84b325d35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef EVERY_ERR_H
#define EVERY_ERR_H

#include <stdio.h>
#include <stdlib.h>

#define ERRM(...) \
	do { \
		fprintf(stderr, "err: " __VA_ARGS__); \
		fprintf(stderr, "\n"); \
	} while (0)

#define ERR(...) \
	do { \
		ERRM(__VA_ARGS__); \
		exit(EXIT_FAILURE); \
	} while (0)

#endif