From 02f77d71211825b590e43f571b1d65bcf56cde4d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 28 Apr 2019 16:36:02 +0200 Subject: Report writer errors and add strict write mode --- serd/serd.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'serd') 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 -- cgit v1.2.1