diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-11-19 22:52:15 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-11-19 22:52:15 +0400 |
commit | c2ffc022eab102fc2e1593c435c1eaa389583278 (patch) | |
tree | 528d30540bde0dce46349b1e9a3f0cd122afcbbf /moses/ConfusionNet.cpp | |
parent | 22864c2b4b154b2c69518bf773fe73f4c557af0a (diff) |
replace CHECK with UTIL_THROW_IF in Moses
Diffstat (limited to 'moses/ConfusionNet.cpp')
-rw-r--r-- | moses/ConfusionNet.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/moses/ConfusionNet.cpp b/moses/ConfusionNet.cpp index 91bc1959f..284d50c78 100644 --- a/moses/ConfusionNet.cpp +++ b/moses/ConfusionNet.cpp @@ -69,7 +69,8 @@ ConfusionNet::ConfusionNet() if (staticData.IsChart()) { m_defaultLabelSet.insert(StaticData::Instance().GetInputDefaultNonTerminal()); } - CHECK(StaticData::Instance().GetInputFeature()); + UTIL_THROW_IF(StaticData::Instance().GetInputFeature() == NULL, util::Exception, + "Input feature must be specified"); } ConfusionNet::~ConfusionNet() { @@ -275,7 +276,7 @@ ConfusionNet::CreateTranslationOptionCollection() const size_t maxNoTransOptPerCoverage = StaticData::Instance().GetMaxNoTransOptPerCoverage(); float translationOptionThreshold = StaticData::Instance().GetTranslationOptionThreshold(); TranslationOptionCollection *rv= new TranslationOptionCollectionConfusionNet(*this, maxNoTransOptPerCoverage, translationOptionThreshold); - CHECK(rv); + assert(rv); return rv; } |