error handling enhancements

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni Uhlig
2020-08-15 13:05:49 +02:00
parent 9ab656dbe2
commit 84448d5e4e
3 changed files with 5 additions and 5 deletions

View File

@@ -112,6 +112,7 @@ int main(void)
{
fprintf(stderr, "JSON parsing failed with return value %d at position %u\n", r, parser.pos);
fprintf(stderr, "JSON string: '%.*s'\n", (int)(json_bytes - json_start), (char *)(buf + json_start));
exit(1);
}
for (int i = 1; i < r; i++)