aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
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 /include/serd
parent1d8cdcef2cc4aaf2e45cfab01a390d6eab56d525 (diff)
downloadserd-a6cd7dd91d93015ec118286b868c3fd43133f3ac.tar.gz
serd-a6cd7dd91d93015ec118286b868c3fd43133f3ac.tar.bz2
serd-a6cd7dd91d93015ec118286b868c3fd43133f3ac.zip
Gracefully handle errors when writing text
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index ac9f2e06..2e7a13e6 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -121,6 +121,7 @@ typedef enum {
SERD_ERR_BAD_CURIE, ///< Invalid CURIE (e.g. prefix does not exist)
SERD_ERR_INTERNAL, ///< Unexpected internal error (should not happen)
SERD_ERR_BAD_WRITE, ///< Error writing to file/stream
+ SERD_ERR_BAD_TEXT, ///< Invalid text encoding
} SerdStatus;
/// Return a string describing a status code
@@ -848,6 +849,7 @@ typedef enum {
SERD_STYLE_RESOLVED = 1U << 2U, ///< Resolve URIs against base URI.
SERD_STYLE_CURIED = 1U << 3U, ///< Shorten URIs into CURIEs.
SERD_STYLE_BULK = 1U << 4U, ///< Write output in pages.
+ SERD_STYLE_STRICT = 1U << 5U, ///< Abort with error on lossy output
} SerdStyle;
/// Create a new RDF writer