diff options
author | default <nobody@localhost> | 2024-04-03 08:58:44 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-04-03 08:58:44 +0200 |
commit | 0f9a859f734e55ec2f853cf910c0a429ef4c77dd (patch) | |
tree | 2e4542e55b1da8513f131db27c6cc1c898ec5ac7 /format.c | |
parent | a0429d46994090f7837ff8c0d3cfea8df81b4c90 (diff) |
Added some error logging regarding the emojis.json file.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -58,6 +58,8 @@ xs_dict *emojis(void) xs_json_dump(d, 4, f); fclose(f); } + else + srv_log(xs_fmt("Error creating '%s'", fn)); } xs_dict *d = NULL; @@ -65,7 +67,12 @@ xs_dict *emojis(void) if ((f = fopen(fn, "r")) != NULL) { d = xs_json_load(f); fclose(f); + + if (d == NULL) + srv_log(xs_fmt("JSON parse error in '%s'", fn)); } + else + srv_log(xs_fmt("Error opening '%s'", fn)); return d; } |