diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-11-19 17:19:23 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-11-19 17:19:23 +0400 |
commit | c2c86ce50d1900db55e420dd08f38facfce50501 (patch) | |
tree | 85ca7cb5d2445dd60cd96325945e14a9626c50b7 /moses/Incremental.cpp | |
parent | 90d115496515c7f6e1383c19694bb91e21fdcbe9 (diff) |
replace CHECK with UTIL_THROW_IF in Moses
Diffstat (limited to 'moses/Incremental.cpp')
-rw-r--r-- | moses/Incremental.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/moses/Incremental.cpp b/moses/Incremental.cpp index 819559ec0..01bdc5567 100644 --- a/moses/Incremental.cpp +++ b/moses/Incremental.cpp @@ -156,7 +156,8 @@ template <class Model> void Fill<Model>::Add(const TargetPhraseCollection &targe template <class Model> void Fill<Model>::AddPhraseOOV(TargetPhrase &phrase, std::list<TargetPhraseCollection*> &, const WordsRange &) { std::vector<lm::WordIndex> words; - CHECK(phrase.GetSize() <= 1); + UTIL_THROW_IF(phrase.GetSize() > 1, util::Exception, + "OOV target phrase should be 0 or 1 word in length"); if (phrase.GetSize()) words.push_back(Convert(phrase.GetWord(0))); |