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/TranslationOptionList.h
parent22864c2b4b154b2c69518bf773fe73f4c557af0a (diff)
replace CHECK with UTIL_THROW_IF in Moses
Diffstat (limited to 'moses/TranslationOptionList.h')
-rw-r--r--moses/TranslationOptionList.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/moses/TranslationOptionList.h b/moses/TranslationOptionList.h
index bde2212d7..b44882140 100644
--- a/moses/TranslationOptionList.h
+++ b/moses/TranslationOptionList.h
@@ -2,7 +2,7 @@
#define moses_TranslationOptionList_h
#include <vector>
-#include "util/check.hh"
+#include "util/exception.hh"
#include <iostream>
#include "Util.h"
@@ -50,11 +50,11 @@ public:
}
const TranslationOption *Get(size_t ind) const {
- CHECK(ind < m_coll.size());
- return m_coll[ind];
+ return m_coll.at(ind);
}
void Remove( size_t ind ) {
- CHECK(ind < m_coll.size());
+ UTIL_THROW_IF(ind >= m_coll.size(), util::Exception,
+ "Out of bound index " << ind);
m_coll.erase( m_coll.begin()+ind );
}
void Add(TranslationOption *transOpt) {