5.4 Status Codes
-
struct SerdWriteResult
A status code with an associated byte count.
This is returned by functions which write to a buffer to inform the caller about the size written, or in case of overflow, size required.
-
SerdStatus status
Status code.
This reports the status of the operation as usual, and also dictates the meaning of
count
.
-
size_t count
Number of bytes written or required.
On success, this is the total number of bytes written. On
SerdStatus.SERD_OVERFLOW
, this is the number of bytes of output space that are required for success.
-
SerdStatus status
-
enum SerdStatus
Return status code.
-
enumerator SERD_SUCCESS
Success.
-
enumerator SERD_FAILURE
Non-fatal failure.
-
enumerator SERD_UNKNOWN_ERROR
Unknown error.
-
enumerator SERD_NO_DATA
Missing input.
-
enumerator SERD_OVERFLOW
Insufficient space.
-
enumerator SERD_BAD_ALLOC
Memory allocation failed.
-
enumerator SERD_BAD_ARG
Invalid argument.
-
enumerator SERD_BAD_CALL
Invalid call.
-
enumerator SERD_BAD_CURIE
Invalid CURIE or unknown namespace prefix.
-
enumerator SERD_BAD_CURSOR
Use of invalidated cursor.
-
enumerator SERD_BAD_EVENT
Invalid event in stream.
-
enumerator SERD_BAD_INDEX
No optimal model index available.
-
enumerator SERD_BAD_LABEL
Encountered clashing blank node label.
-
enumerator SERD_BAD_LITERAL
Invalid literal.
-
enumerator SERD_BAD_PATTERN
Invalid statement pattern.
-
enumerator SERD_BAD_READ
Error reading from file.
-
enumerator SERD_BAD_STACK
Stack overflow.
-
enumerator SERD_BAD_SYNTAX
Invalid syntax.
-
enumerator SERD_BAD_TEXT
Invalid text encoding.
-
enumerator SERD_BAD_URI
Invalid or unresolved URI.
-
enumerator SERD_BAD_WRITE
Error writing to file.
-
enumerator SERD_BAD_DATA
Invalid data.
-
enumerator SERD_SUCCESS
-
const char *serd_strerror(SerdStatus status)
Return a string describing a status code.