aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/status.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-05 10:34:37 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 16:27:02 -0500
commitfebb30141356df83a56026bbb14099e3cb2c82fc (patch)
treef1d2abcdc3872e375ffe8e4138a8043c20b3b1a8 /include/serd/status.h
parentb739848b6ea4c038610ceb7c0b00984a86d99fa9 (diff)
downloadserd-febb30141356df83a56026bbb14099e3cb2c82fc.tar.gz
serd-febb30141356df83a56026bbb14099e3cb2c82fc.tar.bz2
serd-febb30141356df83a56026bbb14099e3cb2c82fc.zip
Use more human-readable status codes
Diffstat (limited to 'include/serd/status.h')
-rw-r--r--include/serd/status.h32
1 files changed, 21 insertions, 11 deletions
diff --git a/include/serd/status.h b/include/serd/status.h
index c640b427..5de96d1d 100644
--- a/include/serd/status.h
+++ b/include/serd/status.h
@@ -16,17 +16,27 @@ SERD_BEGIN_DECLS
/// Return status code
typedef enum {
- SERD_SUCCESS, ///< No error
- SERD_FAILURE, ///< Non-fatal failure
- SERD_ERR_UNKNOWN, ///< Unknown error
- SERD_ERR_BAD_SYNTAX, ///< Invalid syntax
- SERD_ERR_BAD_ARG, ///< Invalid argument
- SERD_ERR_NOT_FOUND, ///< Not found
- SERD_ERR_ID_CLASH, ///< Encountered clashing blank node IDs
- SERD_ERR_BAD_CURIE, ///< Invalid CURIE (e.g. prefix does not exist)
- SERD_ERR_INTERNAL, ///< Unexpected internal error (should not happen)
- SERD_ERR_BAD_WRITE, ///< Error writing to file/stream
- SERD_ERR_BAD_TEXT, ///< Invalid text encoding
+ SERD_SUCCESS, ///< Success
+ SERD_FAILURE, ///< Non-fatal failure
+ SERD_NO_DATA, ///< Missing input
+ SERD_OVERFLOW, ///< Insufficient space
+
+ SERD_UNKNOWN_ERROR, ///< Unknown error
+
+ SERD_BAD_SYNTAX, ///< Invalid syntax
+ SERD_BAD_ARG, ///< Invalid argument
+ SERD_BAD_LABEL, ///< Encountered clashing blank node label
+ SERD_BAD_CURIE, ///< Invalid CURIE or unknown namespace prefix
+ SERD_BAD_ALLOC, ///< Memory allocation failed
+ SERD_BAD_READ, ///< Error reading from file
+ SERD_BAD_WRITE, ///< Error writing to file
+ SERD_BAD_STREAM, ///< File or stream error
+ SERD_BAD_STACK, ///< Stack overflow
+ SERD_BAD_TEXT, ///< Invalid text encoding
+ SERD_BAD_CALL, ///< Invalid call
+ SERD_BAD_URI, ///< Invalid or unresolved URI
+ SERD_BAD_DATA, ///< Invalid data
+ SERD_BAD_LITERAL, ///< Invalid literal
} SerdStatus;
/// Return a string describing a status code