mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
debug: make use of log_msg() in fatal_error() and bug() functions
Instead of writing directly to stderr and/or syslog(3).
This commit is contained in:
parent
e19db15104
commit
7656744877
3 changed files with 13 additions and 12 deletions
4
debug.h
4
debug.h
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue