0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2488: json_encode() gives generic argument error

Problem:    json_encode() gives generic argument error.
Solution:   Mention the type that can't be encoded. (issue #7802)
This commit is contained in:
Bram Moolenaar
2021-02-08 21:53:09 +01:00
parent 4549dad874
commit a853089479
4 changed files with 9 additions and 6 deletions

View File

@@ -230,8 +230,7 @@ json_encode_item(garray_T *gap, typval_T *val, int copyID, int options)
case VAR_PARTIAL:
case VAR_JOB:
case VAR_CHANNEL:
// no JSON equivalent TODO: better error
emsg(_(e_invarg));
semsg(_(e_cannot_json_encode_str), vartype_name(val->v_type));
return FAIL;
case VAR_BLOB: