diff options
author | David Robillard <d@drobilla.net> | 2019-04-28 16:36:02 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:58 +0100 |
commit | 02f77d71211825b590e43f571b1d65bcf56cde4d (patch) | |
tree | ab2828b056eb9cea897b44355c40d85dca590f00 /serd/serd.h | |
parent | e2d2c7b027ac9ac142ae306d248f2d687df211eb (diff) | |
download | serd-02f77d71211825b590e43f571b1d65bcf56cde4d.tar.gz serd-02f77d71211825b590e43f571b1d65bcf56cde4d.tar.bz2 serd-02f77d71211825b590e43f571b1d65bcf56cde4d.zip |
Report writer errors and add strict write mode
Diffstat (limited to 'serd/serd.h')
-rw-r--r-- | serd/serd.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/serd/serd.h b/serd/serd.h index ca695dab..bad9a4ac 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -111,7 +111,8 @@ typedef enum { SERD_ERR_INTERNAL, ///< Unexpected internal error (should not happen) SERD_ERR_OVERFLOW, ///< Stack overflow SERD_ERR_INVALID, ///< Invalid data - SERD_ERR_NO_DATA ///< Unexpected end of input + SERD_ERR_NO_DATA, ///< Unexpected end of input + SERD_ERR_BAD_WRITE ///< Error writing to file/stream } SerdStatus; /// RDF syntax type @@ -266,7 +267,8 @@ typedef enum { SERD_WRITE_ASCII = 1 << 0, ///< Escape all non-ASCII characters SERD_WRITE_UNQUALIFIED = 1 << 1, ///< Do not shorten URIs into CURIEs SERD_WRITE_UNRESOLVED = 1 << 2, ///< Do not make URIs relative - SERD_WRITE_TERSE = 1 << 3 ///< Write terser output without newlines + SERD_WRITE_TERSE = 1 << 3, ///< Write terser output without newlines + SERD_WRITE_STRICT = 1 << 4 ///< Abort with error on lossy output } SerdWriterFlag; /// Bitwise OR of SerdWriterFlag values |