[*] wanted to do this for a while
This commit is contained in:
parent
b8c5239068
commit
f1826cc27f
@ -11,9 +11,6 @@ namespace Aurora::Debug
|
||||
{
|
||||
struct ErrorStack;
|
||||
|
||||
AUKN_SYM void PushStack(ErrorStack *pStack);
|
||||
AUKN_SYM void PopStack(ErrorStack *pStack);
|
||||
|
||||
struct ErrorStackAccessor;
|
||||
|
||||
struct ThreadMessage
|
||||
@ -31,15 +28,8 @@ namespace Aurora::Debug
|
||||
|
||||
struct ErrorStack
|
||||
{
|
||||
inline ErrorStack()
|
||||
{
|
||||
PushStack(this);
|
||||
}
|
||||
|
||||
inline ~ErrorStack()
|
||||
{
|
||||
PopStack(this);
|
||||
}
|
||||
AUKN_SYM ErrorStack();
|
||||
AUKN_SYM ~ErrorStack();
|
||||
|
||||
inline bool HasCaptured()
|
||||
{
|
||||
|
@ -56,8 +56,10 @@ namespace Aurora::Debug
|
||||
|
||||
static thread_local ErrorStack *tlsErrorStackBase;
|
||||
|
||||
AUKN_SYM void PushStack(ErrorStack *pStack)
|
||||
AUKN_SYM ErrorStack::ErrorStack()
|
||||
{
|
||||
auto pStack = this;
|
||||
|
||||
if (!tlsErrorStackBase)
|
||||
{
|
||||
tlsErrorStackBase = pStack;
|
||||
@ -74,8 +76,10 @@ namespace Aurora::Debug
|
||||
dumb.SetNext(itr, pStack);
|
||||
}
|
||||
|
||||
AUKN_SYM void PopStack(ErrorStack *pStack)
|
||||
AUKN_SYM ErrorStack::~ErrorStack()
|
||||
{
|
||||
auto pStack = this;
|
||||
|
||||
if (!tlsErrorStackBase)
|
||||
{
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user