mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Add possible common error
This commit is contained in:
parent
a843591136
commit
1ea46958a0
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue