| 457 | /* ===== ENCODING ===== */ |
| 458 | |
| 459 | static void json_encode_exception(lua_State *l, json_config_t *cfg, strbuf_t *json, int lindex, |
| 460 | const char *reason) |
| 461 | { |
| 462 | if (!cfg->encode_keep_buffer) |
| 463 | strbuf_free(json); |
| 464 | luaL_error(l, "Cannot serialise %s: %s", |
| 465 | lua_typename(l, lua_type(l, lindex)), reason); |
| 466 | } |
| 467 | |
| 468 | /* json_append_string args: |
| 469 | * - lua_State |
no test coverage detected