Skip to content

Commit

Permalink
[Testbed] Report exception in VEH on Win32 platform only if it's a co…
Browse files Browse the repository at this point in the history
…ntinuable exception.
  • Loading branch information
LukasBanana committed Jun 9, 2024
1 parent 1e2c215 commit 823f75f
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions tests/Testbed/TestbedMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,18 @@ namespace LLGL

static LONG WINAPI TestbedVectoredExceptionHandler(EXCEPTION_POINTERS* e)
{
LLGL::UTF8String stackTrace = DebugStackTrace();
::fprintf(
stderr,
"Exception during test run: Address=%p, Code=0x%08X\n"
"Callstack:\n"
"----------\n"
"%s\n",
e->ExceptionRecord->ExceptionAddress, e->ExceptionRecord->ExceptionCode, stackTrace.c_str()
);
if ((e->ExceptionRecord->ExceptionFlags & EXCEPTION_NONCONTINUABLE) == 0)
{
LLGL::UTF8String stackTrace = DebugStackTrace();
::fprintf(
stderr,
"Exception during test run: Address=%p, Code=0x%08X\n"
"Callstack:\n"
"----------\n"
"%s\n",
e->ExceptionRecord->ExceptionAddress, e->ExceptionRecord->ExceptionCode, stackTrace.c_str()
);
}
return EXCEPTION_CONTINUE_SEARCH;
}

Expand Down

0 comments on commit 823f75f

Please sign in to comment.