MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / ScriptAssertF

Function ScriptAssertF

TombEngine/Scripting/Internal/ScriptAssert.h:17–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16template <typename ... Ts>
17bool ScriptAssertF(bool cond, std::string_view str, Ts...args)
18{
19 if (!cond)
20 {
21 auto msg = fmt::format(str, args...);
22 switch (GetScriptErrorMode())
23 {
24 case ErrorMode::Warn:
25 TENLog(msg, LogLevel::Error, LogConfig::All);
26 break;
27
28 case ErrorMode::Terminate:
29 TENLog(msg, LogLevel::Error, LogConfig::All);
30 throw TENScriptException(msg);
31 }
32 }
33
34 return cond;
35}
36
37template <typename ... Ts>
38bool ScriptAssertTerminateF(bool cond, std::string_view str, Ts...args)

Callers 15

MakeReadOnlyTableMethod · 0.85
CallLevelFuncByNameMethod · 0.85
CallLevelFuncMethod · 0.85
IsValidActionFunction · 0.85
GetByNameMethod · 0.85
SetNameMethod · 0.85
SetNameMethod · 0.85
SetRoomNumberMethod · 0.85
SetNameMethod · 0.85
SetNameMethod · 0.85
InitializeMethod · 0.85
SetNameMethod · 0.85

Calls 4

GetScriptErrorModeFunction · 0.85
TENLogFunction · 0.85
TENScriptExceptionClass · 0.85
formatFunction · 0.50

Tested by

no test coverage detected