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/WordLattice.cpp | |
parent | 22864c2b4b154b2c69518bf773fe73f4c557af0a (diff) |
replace CHECK with UTIL_THROW_IF in Moses
Diffstat (limited to 'moses/WordLattice.cpp')
-rw-r--r-- | moses/WordLattice.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/moses/WordLattice.cpp b/moses/WordLattice.cpp index 35f67a13e..331eaae96 100644 --- a/moses/WordLattice.cpp +++ b/moses/WordLattice.cpp @@ -13,7 +13,8 @@ namespace Moses { WordLattice::WordLattice() { - CHECK(StaticData::Instance().GetInputFeature()); + UTIL_THROW_IF(StaticData::Instance().GetInputFeature() == NULL, util::Exception, + "Input feature must be specified"); } size_t WordLattice::GetColumnIncrement(size_t i, size_t j) const @@ -221,7 +222,7 @@ WordLattice::CreateTranslationOptionCollection() const rv = new TranslationOptionCollectionLattice(*this, maxNoTransOptPerCoverage, translationOptionThreshold); } - CHECK(rv); + assert(rv); return rv; } |