MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / json_encode_exception

Function json_encode_exception

deps/lua/src/lua_cjson.c:448–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446/* ===== ENCODING ===== */
447
448static void json_encode_exception(lua_State *l, json_config_t *cfg, strbuf_t *json, int lindex,
449 const char *reason)
450{
451 if (!cfg->encode_keep_buffer)
452 strbuf_free(json);
453 luaL_error(l, "Cannot serialise %s: %s",
454 lua_typename(l, lua_type(l, lindex)), reason);
455}
456
457/* json_append_string args:
458 * - lua_State

Callers 4

lua_array_lengthFunction · 0.85
json_append_numberFunction · 0.85
json_append_objectFunction · 0.85
json_append_dataFunction · 0.85

Calls 4

strbuf_freeFunction · 0.85
luaL_errorFunction · 0.85
lua_typenameFunction · 0.85
lua_typeFunction · 0.85

Tested by

no test coverage detected