aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-23 18:10:50 +0000
committerDavid Robillard <d@drobilla.net>2011-01-23 18:10:50 +0000
commiteaec2a93dcc9f7de5ed2d98fa3427c6f9c2ba878 (patch)
treeb274528955394c9f1650bd51f32e34bd2ed8da41 /src/writer.c
parentbdae0a9015cb399e11525d4296c1a910d038e3dc (diff)
downloadserd-eaec2a93dcc9f7de5ed2d98fa3427c6f9c2ba878.tar.gz
serd-eaec2a93dcc9f7de5ed2d98fa3427c6f9c2ba878.tar.bz2
serd-eaec2a93dcc9f7de5ed2d98fa3427c6f9c2ba878.zip
Gracefully handle failure to emit statement.
Add test cases for 5 and 6-byte UTF-* characters and undefined namespaces. git-svn-id: http://svn.drobilla.net/serd/trunk@48 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/writer.c b/src/writer.c
index b58d4f3e..48f4adc1 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -258,7 +258,9 @@ serd_writer_write_statement(
writer->sink(" ", 1, writer->stream);
write_node(writer, predicate_type, predicate, NULL, NULL);
writer->sink(" ", 1, writer->stream);
- write_node(writer, object_type, object, object_datatype, object_lang);
+ if (!write_node(writer, object_type, object, object_datatype, object_lang)) {
+ return false;
+ }
writer->sink(" .\n", 3, writer->stream);
return true;
case SERD_TURTLE: