Skip to content
Snippets Groups Projects
Commit 8d39b84d authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

try/catch exception in corpusreader

parent 455f2a2c
Branches
No related merge requests found
...@@ -13,8 +13,12 @@ CorpusReader::CorpusReader(const Tagset& tagset, const std::string& corpus_type) ...@@ -13,8 +13,12 @@ CorpusReader::CorpusReader(const Tagset& tagset, const std::string& corpus_type)
boost::shared_ptr<Corpus> CorpusReader::read(const std::string& corpus_file_path) boost::shared_ptr<Corpus> CorpusReader::read(const std::string& corpus_file_path)
{ {
boost::shared_ptr<CorpusReaderI> reader = this->get_corpus_reader_by_type(); try {
return reader->read(corpus_file_path); boost::shared_ptr<CorpusReaderI> reader = this->get_corpus_reader_by_type();
return reader->read(corpus_file_path);
} catch(...) {
throw;
}
} }
// //
......
...@@ -35,7 +35,7 @@ private: ...@@ -35,7 +35,7 @@ private:
private: private:
/// Type of corpus, sets only once in constructor /// Type of corpus, sets only once in constructor
const std::string& corpus_type_; const std::string corpus_type_;
/// Tagset to use, sets only onece in constructor /// Tagset to use, sets only onece in constructor
const Tagset& tagset_; const Tagset& tagset_;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment