diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-11-19 21:23:19 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-11-19 21:23:19 +0400 |
commit | 22864c2b4b154b2c69518bf773fe73f4c557af0a (patch) | |
tree | 660ee9759c095d2c38b769db69259b38d096fc37 /moses/InputPath.cpp | |
parent | c2c86ce50d1900db55e420dd08f38facfce50501 (diff) |
replace CHECK with UTIL_THROW_IF in Moses
Diffstat (limited to 'moses/InputPath.cpp')
-rw-r--r-- | moses/InputPath.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/moses/InputPath.cpp b/moses/InputPath.cpp index 8e75c2251..193e843d1 100644 --- a/moses/InputPath.cpp +++ b/moses/InputPath.cpp @@ -4,7 +4,7 @@ #include "StaticData.h" #include "TypeDef.h" #include "AlignmentInfo.h" -#include "util/check.hh" +#include "util/exception.hh" using namespace std; @@ -61,7 +61,7 @@ void InputPath::SetTargetPhrases(const PhraseDictionary &phraseDictionary const Word &InputPath::GetLastWord() const { size_t len = m_phrase.GetSize(); - CHECK(len); + UTIL_THROW_IF(len == 0, util::Exception, "Input path phrase cannot be empty"); const Word &ret = m_phrase.GetWord(len - 1); return ret; } |