MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / init

Function init

src/Platform/src/Crash.cpp:93–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91#endif // USE_BREAKPAD
92
93 Handle init([[maybe_unused]] const AppInfo& appInfo)
94 {
95#if !defined(DEBUG) && defined(USE_BREAKPAD)
96 _appInfo = appInfo;
97
98 const auto pipeName = Utility::toUtf16(appInfo.name + "_breakpad");
99
100 // Path must exist and be RW!
101 auto exHandler = new google_breakpad::ExceptionHandler(
102 getDumpDirectory(), 0, onCrash, 0, google_breakpad::ExceptionHandler::HANDLER_ALL, MiniDumpWithDataSegs, pipeName.c_str(), 0);
103 return exHandler;
104#else
105 return nullptr;
106#endif
107 }
108
109 void shutdown([[maybe_unused]] Handle exHandler)
110 {

Callers

nothing calls this directly

Calls 2

toUtf16Function · 0.85
getDumpDirectoryFunction · 0.85

Tested by

no test coverage detected