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/RuleCubeItem.cpp | |
parent | c2c86ce50d1900db55e420dd08f38facfce50501 (diff) |
replace CHECK with UTIL_THROW_IF in Moses
Diffstat (limited to 'moses/RuleCubeItem.cpp')
-rw-r--r-- | moses/RuleCubeItem.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/moses/RuleCubeItem.cpp b/moses/RuleCubeItem.cpp index e5a993f5e..06b136fd9 100644 --- a/moses/RuleCubeItem.cpp +++ b/moses/RuleCubeItem.cpp @@ -25,6 +25,7 @@ #include "RuleCubeQueue.h" #include "WordsRange.h" #include "Util.h" +#include "util/exception.hh" #include <boost/functional/hash.hpp> @@ -84,9 +85,9 @@ void RuleCubeItem::CreateHypothesis(const ChartTranslationOptions &transOpt, ChartHypothesis *RuleCubeItem::ReleaseHypothesis() { - CHECK(m_hypothesis); + UTIL_THROW_IF(m_hypothesis == NULL, util::Exception, "Hypothesis is NULL"); ChartHypothesis *hypo = m_hypothesis; - m_hypothesis = 0; + m_hypothesis = NULL; return hypo; } |