MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / fail

Method fail

common/script/scriptargs.cpp:50–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void ScriptArgs::fail(const char* fmt, ...) const
51{
52 // Formatted here rather than handed to ProgramFail, which knows only
53 // %s/%d/%c/%t/%f and has no way to prepend the binding name. A stack buffer
54 // on purpose: this runs on the way out of a failing run, so it must not
55 // depend on an allocation succeeding.
56 char message[256];
57 va_list args;
58 va_start(args, fmt);
59 vsnprintf(message, sizeof(message), fmt, args);
60 va_end(args);
61
62 ProgramFail(mParser, "%s: %s", mBinding, message);
63 __builtin_unreachable(); // ProgramFail longjmps; it is just not declared so
64}
65
66struct Value* ScriptArgs::at(int i) const
67{

Callers 11

ckpt_json_deleteFunction · 0.80
ckpt_json_get_intFunction · 0.80
ckpt_json_get_boolFunction · 0.80
ckpt_json_get_stringFunction · 0.80
ckpt_json_array_elementFunction · 0.80
ckpt_json_object_elementFunction · 0.80
ckpt_json_object_keyFunction · 0.80
titleIndexArgFunction · 0.80
savArgFunction · 0.80
ckpt_delete_directoryFunction · 0.80
ckpt_gui_numpadFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected