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 <hieu@hoang.co.uk>2013-11-18 21:08:58 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-11-18 21:08:58 +0400
commitc8f19220e99131ee4e2fe5f2f6608f90e4206b18 (patch)
treee5173cdb920dd0f75c6aa12dfb323d6436804da0 /OnDiskPt/Vocab.cpp
parent1accc75d14829ca5545d58635c316a06d98ce6aa (diff)
replace CHECK with UTIL_THROW_IFin OnDiskPt
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]);
}