summaryrefslogtreecommitdiffstats
path: root/src/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.h')
-rw-r--r--src/log.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/log.h b/src/log.h
new file mode 100644
index 0000000..dd2835c
--- /dev/null
+++ b/src/log.h
@@ -0,0 +1,8 @@
+#pragma once
+
+#include <stdlib.h>
+
+#define FATAL(msg, ...) do { \
+ fprintf(stderr, "%s:%d:FATAL: " msg "\n", __FILE__, __LINE__, ##__VA_ARGS__); \
+ abort(); \
+}while(0)