Skip to content

Commit

Permalink
Fix Callstack Retrieval in Critical Error Handler. (#1143)
Browse files Browse the repository at this point in the history
* Update Debug.cpp

* Update Debug.cpp
  • Loading branch information
MAJigsaw77 authored Aug 18, 2024
1 parent 1260d89 commit 904ea40
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/hx/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,15 @@ static void CriticalErrorHandler(String inErr, bool allowFixup)
return;
#endif

#ifdef HXCPP_STACK_TRACE
hx::StackContext *ctx = hx::StackContext::getCurrent();
ctx->beginCatch(true);
#endif

if (sCriticalErrorHandler!=null())
sCriticalErrorHandler(inErr);

#ifdef HXCPP_STACK_TRACE
hx::StackContext *ctx = hx::StackContext::getCurrent();
ctx->beginCatch(true);
ctx->dumpExceptionStack();
#endif

Expand Down

0 comments on commit 904ea40

Please sign in to comment.