mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 23:06:00 +01:00
crash in assert on fail for a coredump
This commit is contained in:
parent
c35517d44e
commit
68605c2ccf
1 changed files with 2 additions and 1 deletions
|
@ -43,7 +43,8 @@
|
||||||
#define RASSERT(expr, reason, ...) \
|
#define RASSERT(expr, reason, ...) \
|
||||||
if (!(expr)) { \
|
if (!(expr)) { \
|
||||||
Debug::log(CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n%s\n\nat: line %d in %s", getFormat(reason, ##__VA_ARGS__).c_str(), __LINE__, ([]() constexpr->std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })().c_str()); \
|
Debug::log(CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n%s\n\nat: line %d in %s", getFormat(reason, ##__VA_ARGS__).c_str(), __LINE__, ([]() constexpr->std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })().c_str()); \
|
||||||
RIP("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info."); \
|
printf("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info."); \
|
||||||
|
*((int*)nullptr) = 1; /* so that we crash and get a coredump */ \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define RASSERT(expr, reason, ...)
|
#define RASSERT(expr, reason, ...)
|
||||||
|
|
Loading…
Reference in a new issue