diff options
author | David Robillard <d@drobilla.net> | 2019-04-28 16:36:02 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-03-08 23:23:05 -0500 |
commit | 01daa5914169d57a6a6c4925d3f8d76db80a2bd8 (patch) | |
tree | 468a3371fe17adc082e93f7894147c5d67ed47fe /include/serd/serd.h | |
parent | 36e2f27502524155e6475a75ffcab4999fce166a (diff) | |
download | serd-01daa5914169d57a6a6c4925d3f8d76db80a2bd8.tar.gz serd-01daa5914169d57a6a6c4925d3f8d76db80a2bd8.tar.bz2 serd-01daa5914169d57a6a6c4925d3f8d76db80a2bd8.zip |
Report writer errors and add strict write mode
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r-- | include/serd/serd.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index 91994912..c6300721 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -120,7 +120,9 @@ 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_OVERFLOW, ///< Stack overflow - SERD_ERR_NO_DATA ///< Unexpected end of input + SERD_ERR_NO_DATA, ///< Unexpected end of input + SERD_ERR_BAD_TEXT, ///< Invalid text encoding + SERD_ERR_BAD_WRITE, ///< Error writing to file/stream } SerdStatus; /// RDF syntax type @@ -302,7 +304,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 |