MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SetError

Method SetError

engine/Evaluator/express.cpp:93–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void GameState::SetError(EvalError error, ...) const
94{
95 _e->_error = error;
96 if (error == EvalOK)
97 {
98 _e->_errorText = RString();
99 return;
100 }
101#ifndef ACCESS_ONLY
102 const char* errorText = DefaultInfoFunctions()->GetErrorString(error);
103 BString<MAX_EXPR_LEN> formated;
104
105 va_list va;
106 va_start(va, error);
107 vsprintf((char*)(const char*)formated, errorText, va);
108 va_end(va);
109
110 _e->_errorText = formated.cstr();
111 _e->_errorCarretPos = _e->_pos - _e->_pos0;
112
113#endif
114}
115
116void GameState::TypeError(GameType exp, GameType was, const char* name) const
117{

Callers 11

PodilFunction · 0.45
ZbytekFunction · 0.45
Atan2Function · 0.45
ListSelectFunction · 0.45
ListResizeFunction · 0.45
ListSetFunction · 0.45
StringLocalFunction · 0.45
StringRepeatFunction · 0.45
StringExitWithFunction · 0.45
ForDoOpFunction · 0.45
ArrayThenFunction · 0.45

Calls 4

vsprintfFunction · 0.85
cstrMethod · 0.80
RStringClass · 0.50
GetErrorStringMethod · 0.45

Tested by

no test coverage detected