aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-07-09 21:25:23 -0400
committerDavid Robillard <d@drobilla.net>2022-01-13 23:04:11 -0500
commite0e5b83f30b784699a5ae039e8ae7e1dd69410d4 (patch)
tree8d5e63e2d09373de4d3db59038020948c4321dd2 /include/serd/serd.h
parentd8e718453cf7a29045b648683b0645094bc66ae9 (diff)
downloadserd-e0e5b83f30b784699a5ae039e8ae7e1dd69410d4.tar.gz
serd-e0e5b83f30b784699a5ae039e8ae7e1dd69410d4.tar.bz2
serd-e0e5b83f30b784699a5ae039e8ae7e1dd69410d4.zip
Improve writer error handling
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r--include/serd/serd.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index bfab6192..3263027b 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -203,6 +203,8 @@ typedef enum {
SERD_ERR_BAD_CURIE, ///< Invalid CURIE or unknown namespace prefix
SERD_ERR_INTERNAL, ///< Unexpected internal error
SERD_ERR_OVERFLOW, ///< Stack overflow
+ SERD_ERR_BAD_TEXT, ///< Invalid text encoding
+ SERD_ERR_BAD_WRITE, ///< Error writing to file/stream
} SerdStatus;
/**
@@ -1595,7 +1597,8 @@ typedef enum {
SERD_WRITE_ASCII = 1u << 0u, ///< Escape all non-ASCII characters
SERD_WRITE_UNQUALIFIED = 1u << 1u, ///< Do not shorten URIs into CURIEs
SERD_WRITE_UNRESOLVED = 1u << 2u, ///< Do not make URIs relative
- SERD_WRITE_TERSE = 1u << 3u ///< Write terser output without newlines
+ SERD_WRITE_TERSE = 1u << 3u, ///< Write terser output without newlines
+ SERD_WRITE_STRICT = 1u << 4u ///< Abort with error on lossy output
} SerdWriterFlag;
/// Bitwise OR of SerdWriterFlag values