Add possible common error

This commit is contained in:
Ekaitz Zarraga 2020-05-22 12:02:58 +02:00
parent a843591136
commit 1ea46958a0

View file

@ -516,6 +516,8 @@ sexp unparse_json (sexp ctx, sexp self, sexp obj) {
res = sexp_c_string(ctx, "true", -1);
} else if (obj == SEXP_NULL) {
res = sexp_c_string(ctx, "null", -1);
} else if (sexp_pairp(obj)) {
res = sexp_json_unparse_exception(ctx, self, "unable to encode elemente: key-value pair out of object", obj);
} else {
res = sexp_json_unparse_exception(ctx, self, "unable to encode element", obj);
}