| 98 | } windowsExceptionsLogger_; |
| 99 | |
| 100 | WindowsExceptionsLogger::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 | |
| 116 | WindowsExceptionsLogger::~WindowsExceptionsLogger() |
| 117 | { |
nothing calls this directly
no test coverage detected