aboutsummaryrefslogtreecommitdiff
path: root/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/debug.h b/debug.h
index 92a0e091..29ff9606 100644
--- a/debug.h
+++ b/debug.h
@@ -2,7 +2,8 @@
#include "macros.h"
-#define FATAL_ERROR(...) fatal_error(__FILE__, __LINE__, __VA_ARGS__)
+#define FATAL_ERROR(msg, err) fatal_error(__FILE__, __LINE__, msg, err)
+#define FATAL_ERROR_ON(cond, err) if (unlikely(cond)) FATAL_ERROR(__func__, err)
#ifdef NDEBUG
#define BUG(...) UNREACHABLE()