Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Callstack Retrieval in Critical Error Handler. #1143

Merged
merged 2 commits into from
Aug 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Debug.cpp
MAJigsaw77 authored Aug 17, 2024
commit 34506f3a5c6921437d4a362255a39d7bd385c0a0
5 changes: 4 additions & 1 deletion src/hx/Debug.cpp
Original file line number Diff line number Diff line change
@@ -80,12 +80,15 @@ static void CriticalErrorHandler(String inErr, bool allowFixup)
#ifdef HXCPP_STACK_TRACE
hx::StackContext *ctx = hx::StackContext::getCurrent();
ctx->beginCatch(true);
ctx->dumpExceptionStack();
#endif

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

#ifdef HXCPP_STACK_TRACE
ctx->dumpExceptionStack();
#endif

DBGLOG("Critical Error: %s\n", inErr.utf8_str());

#if defined(HX_WINDOWS) && !defined(HX_WINRT)