MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / WindowsExceptionsLogger

Method WindowsExceptionsLogger

source/MRMesh/MRLogWindowsExceptions.cpp:100–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98} windowsExceptionsLogger_;
99
100WindowsExceptionsLogger::WindowsExceptionsLogger()
101{
102 spdlog::debug( "Start logging Windows exceptions" );
103 oldPurecallHandler_ = _set_purecall_handler( []()
104 {
105 spdlog::critical( "Pure virtual function call" );
106 spdlog::info( "Pure virtual function call stacktrace:\n{}", getCurrentStacktrace() );
107 printCurrentTimerBranch();
108 std::exit( 0 );
109 } );
110 // The system does not display the critical-error-handler message box
111 // The system does not display the Windows Error Reporting dialog
112 SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX );
113 oldVectoredExceptionHandler_ = AddVectoredExceptionHandler( 0, logWindowsException );
114}
115
116WindowsExceptionsLogger::~WindowsExceptionsLogger()
117{

Callers

nothing calls this directly

Calls 2

getCurrentStacktraceFunction · 0.85
printCurrentTimerBranchFunction · 0.85

Tested by

no test coverage detected