MCPcopy Create free account
hub / github.com/defold/defold / json_encode_exception

Function json_encode_exception

engine/script/src/luacjson/lua_cjson.c:575–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573/* ===== ENCODING ===== */
574
575static void json_encode_exception(lua_State *l, json_config_t *cfg, strbuf_t *json, int lindex,
576 const char *reason)
577{
578 // We don't need the buffer if error happened.
579 strbuf_free(json);
580
581 DefoldError(cfg, "Cannot serialise %s: %s",
582 lua_typename(l, lua_type(l, lindex)), reason);
583}
584
585/* json_append_string args:
586 * - 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
DefoldErrorFunction · 0.85
lua_typenameFunction · 0.85
lua_typeFunction · 0.85

Tested by

no test coverage detected