diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-11-18 21:08:58 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-11-18 21:08:58 +0400 |
commit | c8f19220e99131ee4e2fe5f2f6608f90e4206b18 (patch) | |
tree | e5173cdb920dd0f75c6aa12dfb323d6436804da0 /OnDiskPt/Vocab.cpp | |
parent | 1accc75d14829ca5545d58635c316a06d98ce6aa (diff) |
replace CHECK with UTIL_THROW_IFin OnDiskPt
Diffstat (limited to 'OnDiskPt/Vocab.cpp')
-rw-r--r-- | OnDiskPt/Vocab.cpp | 3 |
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]); } |