diff options
author | David Robillard <d@drobilla.net> | 2018-05-14 01:03:00 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-05-27 21:10:21 +0200 |
commit | dc9eaf381cb774ce9ddf57613e99fb7e381da041 (patch) | |
tree | 784c630908d43a6e07b8ae7606b487201f1d22a9 /src/serdi.c | |
parent | 52d0ac81eee3462c6839c7374ffe57329f7702b7 (diff) | |
download | serd-dc9eaf381cb774ce9ddf57613e99fb7e381da041.tar.gz serd-dc9eaf381cb774ce9ddf57613e99fb7e381da041.tar.bz2 serd-dc9eaf381cb774ce9ddf57613e99fb7e381da041.zip |
Clean up error handling
Diffstat (limited to 'src/serdi.c')
-rw-r--r-- | src/serdi.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/serdi.c b/src/serdi.c index 20690c37..70061b68 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -301,14 +301,12 @@ main(int argc, char** argv) status = serd_reader_start_file(reader, input, bulk_read); } - if (!status) { + if (status ) { + SERDI_ERRORF("failed to start stream: %s\n", serd_strerror(status)); + } else { status = serd_reader_read_document(reader); } - if (status) { - SERDI_ERRORF("read error: %s\n", serd_strerror(status)); - } - serd_reader_end_stream(reader); if (status <= SERD_FAILURE && use_model) { |