summaryrefslogtreecommitdiff
path: root/misc/diag.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc/diag.h')
-rw-r--r--misc/diag.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/misc/diag.h b/misc/diag.h
index 0184f15..5e2df87 100644
--- a/misc/diag.h
+++ b/misc/diag.h
@@ -23,6 +23,16 @@
extern unsigned verbose;
+/* ----- Internal errors --------------------------------------------------- */
+
+
+#define STRINGIFY(s) #s
+#define STRINGIFY_EXPAND(s) STRINGIFY(s)
+
+#define BUG(...) \
+ fatal("BUG " __FILE__ ":" STRINGIFY_EXPAND(__LINE__) ": " __VA_ARGS__)
+
+
/* ----- Specialized diagnostic functions ---------------------------------- */