MCPcopy Create free account
hub / github.com/InoriRus/Kyty / SetLoadError

Function SetLoadError

source/lib/Scripts/src/ScriptsLoader.cpp:10–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8static String* g_load_err = nullptr;
9
10void SetLoadError(const String& err)
11{
12 Core::mem_tracker_disable();
13
14 if (g_load_err == nullptr)
15 {
16 g_load_err = new String;
17 }
18
19 String s = err.IsEmpty() ? U"" : String::FromPrintf("%s", err.C_Str());
20
21 if (g_load_err->IsEmpty())
22 {
23 *g_load_err = s;
24 } else
25 {
26 *g_load_err = *g_load_err + U"\n" + s;
27 }
28
29 Core::mem_tracker_enable();
30}
31
32void ResetLoadError()
33{

Callers 1

RunScriptFunction · 0.85

Calls 3

mem_tracker_disableFunction · 0.85
mem_tracker_enableFunction · 0.85
IsEmptyMethod · 0.45

Tested by

no test coverage detected