diff options
author | David Robillard <d@drobilla.net> | 2019-04-28 16:36:02 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-21 18:12:04 +0200 |
commit | e481791e907a551495f8929756b8ca5e24cac277 (patch) | |
tree | e27d9836bb5425cdfc2f64febb2d4966b2c53660 /serd | |
parent | 5ab74d90a99cc72d9c0ffa3deae7779ff86c518b (diff) | |
download | serd-e481791e907a551495f8929756b8ca5e24cac277.tar.gz serd-e481791e907a551495f8929756b8ca5e24cac277.tar.bz2 serd-e481791e907a551495f8929756b8ca5e24cac277.zip |
Report writer errors and add strict write mode
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/serd/serd.h b/serd/serd.h index a5b28676..ce0213a7 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -110,7 +110,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 @@ -262,8 +263,9 @@ typedef struct { always ASCII). */ typedef enum { - SERD_WRITE_ASCII = 1 << 0, ///< Escape all non-ASCII characters - SERD_WRITE_TERSE = 1 << 1, ///< Write terser output without newlines + SERD_WRITE_ASCII = 1 << 0, ///< Escape all non-ASCII characters + SERD_WRITE_TERSE = 1 << 1, ///< Write terser output without newlines + SERD_WRITE_STRICT = 1 << 2, ///< Abort with error on lossy output } SerdWriterFlag; /// Bitwise OR of SerdWriterFlag values |