forked from Bananymous/banan-os
BAN: ASSERT now prints the condition
This commit is contained in:
parent
53d1d12c12
commit
c35181a92f
|
@ -7,7 +7,7 @@
|
||||||
#if defined(__is_kernel)
|
#if defined(__is_kernel)
|
||||||
#include <kernel/Panic.h>
|
#include <kernel/Panic.h>
|
||||||
#define MUST(error) ({ auto e = error; if (e.IsError()) Kernel::Panic("{}", e.GetError()); e.Value(); })
|
#define MUST(error) ({ auto e = error; if (e.IsError()) Kernel::Panic("{}", e.GetError()); e.Value(); })
|
||||||
#define ASSERT(cond) do { if (!(cond)) Kernel::Panic("ASSERT() failed"); } while(false)
|
#define ASSERT(cond) do { if (!(cond)) Kernel::Panic("ASSERT("#cond") failed"); } while(false)
|
||||||
#else
|
#else
|
||||||
#error "NOT IMPLEMENTED"
|
#error "NOT IMPLEMENTED"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue