MCPcopy Create free account
hub / github.com/Norbyte/ositools / ShowStartupError

Method ShowStartupError

OsiInterface/DataLibraries.cpp:294–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292 }
293
294 void LibraryManager::ShowStartupError(std::wstring const & msg)
295 {
296 if (EoCClient == nullptr
297 || EoCClientHandleError == nullptr
298 || EoCAlloc == nullptr) {
299 return;
300 }
301
302 std::thread messageThread([this, msg]() {
303 unsigned retries{ 0 };
304 while (!CanShowError() && retries < 600) {
305 Sleep(100);
306 retries++;
307 }
308
309 if (retries >= 300) {
310 return;
311 }
312
313 STDWString str;
314 str.Set(msg);
315 EoCClientHandleError(*EoCClient, &str, false, &str);
316 });
317 messageThread.detach();
318 }
319
320 bool LibraryManager::CanShowError()
321 {

Callers 1

Calls 1

SetMethod · 0.80

Tested by

no test coverage detected