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 22:52:15 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-11-19 22:52:15 +0400
commitc2ffc022eab102fc2e1593c435c1eaa389583278 (patch)
tree528d30540bde0dce46349b1e9a3f0cd122afcbbf /moses/TranslationOption.cpp
parent22864c2b4b154b2c69518bf773fe73f4c557af0a (diff)
replace CHECK with UTIL_THROW_IF in Moses
Diffstat (limited to 'moses/TranslationOption.cpp')
-rw-r--r--moses/TranslationOption.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/moses/TranslationOption.cpp b/moses/TranslationOption.cpp
index afbc7fe04..64fc126da 100644
--- a/moses/TranslationOption.cpp
+++ b/moses/TranslationOption.cpp
@@ -79,13 +79,15 @@ void TranslationOption::Evaluate(const InputType &input)
const InputPath &TranslationOption::GetInputPath() const
{
- CHECK(m_inputPath);
+ UTIL_THROW_IF(m_inputPath == NULL, util::Exception,
+ "No input path");
return *m_inputPath;
}
void TranslationOption::SetInputPath(const InputPath &inputPath)
{
- CHECK(m_inputPath == NULL);
+ UTIL_THROW_IF(m_inputPath, util::Exception,
+ "Input path already specified");
m_inputPath = &inputPath;
}