MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / __hxcpp_dbg_fix_critical_error

Function __hxcpp_dbg_fix_critical_error

src/hx/Debugger.cpp:1497–1515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1495
1496
1497bool __hxcpp_dbg_fix_critical_error(String inErr)
1498{
1499 if (hx::g_eventNotificationHandler != null())
1500 {
1501 hx::JustGcStackFrame frame;
1502 hx::DebuggerContext *stack = frame.ctx->mDebugger;
1503
1504 //if the thread with the critical error is the debugger one,
1505 //we don't break as it would block debugging since the debugger thread
1506 //is the only one which can wake up application threads.
1507 if (stack->mThreadNumber == hx::g_debugThreadNumber) {
1508 hx::Throw(HX_CSTRING("Critical Error in the debugger thread"));
1509 }
1510
1511 stack->DoBreak(hx::DBG_STATUS_STOPPED_CRITICAL_ERROR, -1, &inErr);
1512 return true;
1513 }
1514 return false;
1515}
1516
1517
1518void __hxcpp_execution_trace(int inLevel)

Callers 2

CriticalErrorHandlerFunction · 0.85
NullReferenceFunction · 0.85

Calls 3

ThrowFunction · 0.85
DoBreakMethod · 0.80
nullClass · 0.50

Tested by

no test coverage detected