Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2013-11-19 21:23:19 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-11-19 21:23:19 +0400
commit22864c2b4b154b2c69518bf773fe73f4c557af0a (patch)
tree660ee9759c095d2c38b769db69259b38d096fc37 /moses/RuleCubeItem.cpp
parentc2c86ce50d1900db55e420dd08f38facfce50501 (diff)
replace CHECK with UTIL_THROW_IF in Moses
Diffstat (limited to 'moses/RuleCubeItem.cpp')
-rw-r--r--moses/RuleCubeItem.cpp5
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;
}