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:
Diffstat (limited to 'OnDiskPt/Vocab.cpp')
-rw-r--r--OnDiskPt/Vocab.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/OnDiskPt/Vocab.cpp b/OnDiskPt/Vocab.cpp
index 03af2d886..2bcf37348 100644
--- a/OnDiskPt/Vocab.cpp
+++ b/OnDiskPt/Vocab.cpp
@@ -21,6 +21,7 @@
#include <fstream>
#include "OnDiskWrapper.h"
#include "Vocab.h"
+#include "util/exception.hh"
using namespace std;
@@ -35,7 +36,7 @@ bool Vocab::Load(OnDiskWrapper &onDiskWrapper)
while(getline(file, line)) {
vector<string> tokens;
Moses::Tokenize(tokens, line);
- CHECK(tokens.size() == 2);
+ UTIL_THROW_IF(tokens.size() != 2, util::Exception, "Vocab file corrupted");
const string &key = tokens[0];
m_vocabColl[key] = Moses::Scan<UINT64>(tokens[1]);
}