luna: Make check() and expect() output errors in userspace
This commit is contained in:
parent
c82ed5df01
commit
3ac3d54788
@ -1,6 +1,11 @@
|
|||||||
#include <luna/Attributes.h>
|
#include <luna/Attributes.h>
|
||||||
|
|
||||||
_weak [[noreturn]] bool __check_failed(const char*, const char*, const char*, const char*)
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
_weak [[noreturn]] bool __check_failed(const char* file, const char* line, const char* func, const char* expr)
|
||||||
{
|
{
|
||||||
__builtin_trap();
|
// FIXME: Output to standard error instead of standard output.
|
||||||
|
printf("Check failed at %s:%s in %s: %s\n", file, line, func, expr);
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user