aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-05-27 18:16:08 +0200
committerDavid Robillard <d@drobilla.net>2018-05-27 18:16:08 +0200
commita0c483d9f1f3955499560ef1536fdb760df274fb (patch)
treefa46603a7180e17a3d4e78ea088969d48babc79c /src/writer.c
parent120b99b1cb02f153ec6f4071a8071ac08cb9d074 (diff)
downloadserd-a0c483d9f1f3955499560ef1536fdb760df274fb.tar.gz
serd-a0c483d9f1f3955499560ef1536fdb760df274fb.tar.bz2
serd-a0c483d9f1f3955499560ef1536fdb760df274fb.zip
Clarify errors returned by serd_env_expand()
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/writer.c b/src/writer.c
index 58cf17ee..603ca65e 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -525,14 +525,14 @@ write_curie(SerdWriter* const writer,
const Field field,
const SerdStatementFlags flags)
{
- SerdChunk prefix;
- SerdChunk suffix;
+ SerdChunk prefix;
+ SerdChunk suffix;
+ SerdStatus st;
switch (writer->syntax) {
case SERD_NTRIPLES:
case SERD_NQUADS:
- if (serd_env_expand(writer->env, node, &prefix, &suffix)) {
- w_err(writer, SERD_ERR_BAD_CURIE,
- "undefined namespace prefix `%s'\n", node->buf);
+ if ((st = serd_env_expand(writer->env, node, &prefix, &suffix))) {
+ w_err(writer, st, "undefined namespace prefix `%s'\n", node->buf);
return false;
}
write_sep(writer, SEP_URI_BEGIN);