aboutsummaryrefslogtreecommitdiffstats
path: root/src/string.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-04-09 11:54:11 -0400
committerDavid Robillard <d@drobilla.net>2023-04-16 22:17:56 -0400
commita6cd7dd91d93015ec118286b868c3fd43133f3ac (patch)
treeb10d88ca099c0d0986c2e48ccca62023a0ac1614 /src/string.c
parent1d8cdcef2cc4aaf2e45cfab01a390d6eab56d525 (diff)
downloadserd-a6cd7dd91d93015ec118286b868c3fd43133f3ac.tar.gz
serd-a6cd7dd91d93015ec118286b868c3fd43133f3ac.tar.bz2
serd-a6cd7dd91d93015ec118286b868c3fd43133f3ac.zip
Gracefully handle errors when writing text
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/string.c b/src/string.c
index 07513739..ecba3463 100644
--- a/src/string.c
+++ b/src/string.c
@@ -39,6 +39,8 @@ serd_strerror(const SerdStatus status)
return (const uint8_t*)"Internal error";
case SERD_ERR_BAD_WRITE:
return (const uint8_t*)"Error writing to file/stream";
+ case SERD_ERR_BAD_TEXT:
+ return (const uint8_t*)"Invalid text encoding";
}
return (const uint8_t*)"Unknown error"; // never reached
}