MCPcopy Create free account
hub / github.com/aardappel/treesheets / InitUnhandledExceptionFilter

Function InitUnhandledExceptionFilter

src/StackWalker/StackWalkerHelpers.cpp:119–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void InitUnhandledExceptionFilter()
120{
121 TCHAR szModName[_MAX_PATH];
122 if (GetModuleFileName(NULL, szModName, sizeof(szModName)/sizeof(TCHAR)) != 0)
123 {
124 _tcscpy_s(s_szExceptionLogFileName, szModName);
125 _tcscat_s(s_szExceptionLogFileName, _T(".exp.log"));
126 }
127 if (s_bUnhandledExeptionFilterSet == FALSE)
128 {
129 // set global exception handler (for handling all unhandled exceptions)
130 SetUnhandledExceptionFilter(CrashHandlerExceptionFilter);
131#if defined _M_X64 || defined _M_IX86
132 PreventSetUnhandledExceptionFilter();
133#endif
134 s_bUnhandledExeptionFilterSet = TRUE;
135 }
136}

Callers 1

OnInitMethod · 0.50

Calls 1

Tested by

no test coverage detected