MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / handleFunction

Method handleFunction

modules/core/core/include/SkrCore/crash.h:116–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115template <typename F>
116void SCrashHandler::handleFunction(F&& f, CrashTerminateCode code)
117{
118 beforeHandlingSignal(code);
119
120 auto& this_ = *skr_crash_handler_get();
121 // Acquire lock to avoid other threads (if exist) to crash while we are inside.
122 this_.crashLock();
123 f();
124 // Terminate process
125 if (!kContinue)
126 {
127 this_.terminateProcess(code);
128 }
129 // Free lock
130 this_.crashUnlock();
131}
132#endif

Callers 13

SigabrtHandlerMethod · 0.80
SigintHandlerMethod · 0.80
SigtermHandlerMethod · 0.80
SigfpeHandlerMethod · 0.80
SigillHandlerMethod · 0.80
SigsegvHandlerMethod · 0.80
crash_handler.cppFile · 0.80
SigabrtHandlerMethod · 0.80
SigintHandlerMethod · 0.80
SigtermHandlerMethod · 0.80
SigfpeHandlerMethod · 0.80
SigillHandlerMethod · 0.80

Calls 2

crashUnlockMethod · 0.80
terminateProcessMethod · 0.45

Tested by

no test coverage detected