BigFile/Sasquatch #1
@@ -17,16 +17,27 @@
|
||||
#include <csignal>
|
||||
#endif
|
||||
|
||||
#define BIGFOOT_FLUSH_LOG \
|
||||
do \
|
||||
{ \
|
||||
if (Bigfoot::Singleton<Bigfoot::Log>::HasInstance()) \
|
||||
{ \
|
||||
Bigfoot::Singleton<Bigfoot::Log>::GetInstance().Flush(); \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
#if defined BIGFOOT_WINDOWS
|
||||
#define BREAK \
|
||||
do \
|
||||
{ \
|
||||
BIGFOOT_FLUSH_LOG; \
|
||||
__debugbreak(); \
|
||||
} while (false)
|
||||
#elif defined BIGFOOT_LINUX
|
||||
#define BREAK \
|
||||
do \
|
||||
{ \
|
||||
BIGFOOT_FLUSH_LOG; \
|
||||
std::raise(SIGTRAP); \
|
||||
} while (false)
|
||||
#endif
|
||||
@@ -60,10 +71,6 @@
|
||||
if (!(p_assert)) [[unlikely]] \
|
||||
{ \
|
||||
HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
if (Bigfoot::Singleton<Bigfoot::Log>::HasInstance()) \
|
||||
{ \
|
||||
Bigfoot::Singleton<Bigfoot::Log>::GetInstance().Flush(); \
|
||||
} \
|
||||
BREAK; \
|
||||
std::abort(); \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user