MCPcopy Create free account
hub / github.com/crownengine/crown / topLevelExceptionFilter

Method topLevelExceptionFilter

3rdparty/bx/src/debug.cpp:1290–1317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1288 }
1289
1290 static uint32_t __stdcall topLevelExceptionFilter(ExceptionPointers* _info)
1291 {
1292 const char* name = "Unknown signal?";
1293
1294 const uint32_t exceptionCode = _info->exceptionRecord->exceptionCode;
1295
1296 for (uint32_t ii = 0; ii < BX_COUNTOF(s_exceptionInfo); ++ii)
1297 {
1298 const ExceptionInfo& signal = s_exceptionInfo[ii];
1299
1300 if (signal.exceptionCode == exceptionCode)
1301 {
1302 name = signal.name;
1303 break;
1304 }
1305 }
1306
1307 if (assertFunction(Location("Exception Handler", UINT32_MAX), 7 /* topLevelExceptionFilter function + 6 deep stack of OS exception handler */
1308 , "%s Exception Code %x"
1309 , name
1310 , _info->exceptionRecord->exceptionCode
1311 ) )
1312 {
1313 exit(kExitFailure, false);
1314 }
1315
1316 return 0 /* EXCEPTION_CONTINUE_SEARCH */;
1317 }
1318 };
1319
1320#else // Noop exception handler

Callers

nothing calls this directly

Calls 3

assertFunctionFunction · 0.85
LocationClass · 0.85
exitFunction · 0.70

Tested by

no test coverage detected