summaryrefslogtreecommitdiff
path: root/examples/c-json-stdout
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-08-15 13:05:49 +0200
committerToni Uhlig <matzeton@googlemail.com>2020-08-15 13:05:49 +0200
commit84448d5e4e9207835c62fd19a4109f07ad5ca595 (patch)
tree86aa124e898516f10b96c2916dc9cb539b7e3fd8 /examples/c-json-stdout
parent9ab656dbe264b6c216cc9e890a50d9e20b623fa5 (diff)
error handling enhancements
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-json-stdout')
-rw-r--r--examples/c-json-stdout/c-json-stdout.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/c-json-stdout/c-json-stdout.c b/examples/c-json-stdout/c-json-stdout.c
index 83af9d12d..18c50a491 100644
--- a/examples/c-json-stdout/c-json-stdout.c
+++ b/examples/c-json-stdout/c-json-stdout.c
@@ -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++)