MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / internal_kpanic

Function internal_kpanic

source/util/log.cpp:35–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void internal_kpanic(BString msg) {
36 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(logMutex);
37 if (KSystem::logFile.isOpen()) {
38 KSystem::logFile.write(msg);
39 }
40 fwrite(msg.c_str(), 1, msg.length(), stderr);
41 fflush(stderr);
42#if defined(BOXEDWINE_MSVC) && defined(_DEBUG)
43 OutputDebugStringA(msg.c_str());
44#endif
45 if (KSystem::videoOption == VIDEO_NORMAL) {
46#ifndef _TEST
47 KNativeSystem::exit(msg.c_str(), 1);
48#endif
49 } else {
50 KNativeThread::sleep(5000);
51 }
52 exit(1);
53}
54
55void kwarn(const char* msg) {
56 internal_log(BString::copy(msg) + "\n", stdout);

Callers 2

kpanicFunction · 0.85
kpanic_fmtFunction · 0.85

Calls 4

isOpenMethod · 0.45
writeMethod · 0.45
c_strMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected