From 78507da5cf751bfaac2ea639cc4ddb93d98a5c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=99dzia?= <Pawel.Kedzia@pwr.wroc.pl> Date: Thu, 26 Jan 2012 10:06:06 +0100 Subject: [PATCH] Exception when one of the relation or annotation path is not given in DocumentReader. --- libcorpus2_whole/io/documentcorpusreader.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libcorpus2_whole/io/documentcorpusreader.cpp b/libcorpus2_whole/io/documentcorpusreader.cpp index 12d0359..a85e97c 100644 --- a/libcorpus2_whole/io/documentcorpusreader.cpp +++ b/libcorpus2_whole/io/documentcorpusreader.cpp @@ -35,8 +35,7 @@ boost::shared_ptr<Corpus> DocumentCorpusReader::read(const std::string& corpus_f continue; } else if (splitted_line.size() == 1) { - // maybe exception? - continue; + throw Corpus2Error("DocumentReader requires both paths to relations and annotations"); } ann_path = splitted_line[0]; -- GitLab