diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-02-09 18:52:53 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-02-09 18:52:53 +0000 |
| commit | d16217eca9a3a0fa6f34dbb2b2450775fb58357c (patch) | |
| tree | f93bd378247a2e0e678de1eb98678a95dac96c11 /debug.h | |
| parent | render: use portable HAS_INCLUDE() wrapper instead of __has_include() (diff) | |
| parent | debug: make use of log_msg() in fatal_error() and bug() functions (diff) | |
Merge remote-tracking branch 'origin/debug-log'
Diffstat (limited to 'debug.h')
| -rw-r--r-- | debug.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2,6 +2,8 @@ #include "macros.h" +#define FATAL_ERROR(...) fatal_error(__FILE__, __LINE__, __VA_ARGS__) + #ifdef NDEBUG #define BUG(...) UNREACHABLE() #else @@ -26,5 +28,5 @@ #endif #endif -noreturn void fatal_error(const char *msg, int err) COLD; +noreturn void fatal_error(const char *file, int line, const char *msg, int err) COLD; noreturn void bug(const char *file, int line, const char *func, const char *fmt, ...) PRINTF(4) COLD; |
